Message-ID: From: "markmaker (@markmaker)" To: "postgresql-interfaces/psqlodbc" Date: Fri, 21 Nov 2025 18:29:52 +0000 Subject: Re: [postgresql-interfaces/psqlodbc] PR #145: SQL_C_BINARY data buffer uses NULL terminator, but realloc() may be missed In-Reply-To: References: List-Id: X-GitHub-Author-Login: markmaker X-GitHub-Comment-Id: 3564176829 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 145 X-GitHub-Repo: postgresql-interfaces/psqlodbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/postgresql-interfaces/psqlodbc/pull/145#issuecomment-3564176829 Content-Type: text/plain; charset=utf-8 I'm trying to compile the driver myself. Any feedback very welcome. So far I managed to scratch this together: ```sh # this is on a Kubuntu 25.04 with installation according # to https://wiki.postgresql.org/wiki/Apt (modernized). sudo apt-get install unixodbc odbcinst unixodbc-dev libpq-dev # my PR version git clone https://github.com/markmaker/psqlodbc.git ./bootstrap # if somebody knows a better/automatic/more correct way to configure these paths, please speak up 🤠 ./configure \ --with-unixodbc=/usr/include/x86_64-linux-gnu/unixODBC/ \ --with-libpq=/usr/include/postgresql \ --enable-pthreads \ CPPFLAGS="-DSQLCOLATTRIBUTE_SQLLEN" make sudo make install ``` Then I copied the regular `[PostgreSQL Unicode]` section in the `/etc/odbcinst.ini` to have the `/usr/local/lib/` path prefix where make install reported it installed: ```ini ... [PostgreSQL Unicode Fixed] Description=PostgreSQL ODBC driver (Unicode version) Driver=/usr/local/lib/psqlodbcw.so Setup=/usr/local/lib/libodbcpsqlS.so Debug=0 CommLog=1 UsageCount=2 ``` Then I changed my driver connect to point to the new one... `"DRIVER={PostgreSQL Unicode Fixed};SERVER=..."` ... tested again and it seems the problem is gone! 🎈🎉