postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: markmaker (@markmaker) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: Re: [postgresql-interfaces/psqlodbc] PR #145: SQL_C_BINARY data buffer uses NULL terminator, but realloc() may be missed
Date: Fri, 21 Nov 2025 18:29:52 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
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! 🎈🎉
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://postgresql-interfaces/psqlodbc
Cc: [email protected], [email protected]
Subject: Re: [postgresql-interfaces/psqlodbc] PR #145: SQL_C_BINARY data buffer uses NULL terminator, but realloc() may be missed
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox