[plt-scheme] Advise debugging my srpersist connection (w/ postgres)

From: Richard Michael (rmichael at fields.utoronto.ca)
Date: Tue Sep 10 12:39:00 EDT 2002

Hi Brent,

I am not using an odbcinst.ini file.  I played with it's contents, then
removed it and found that it didn't matter.  In my case, the
odbcinst.ini file was from the unixODBC package that I had installed
prior to the iODBC package.  Since I wasn't using unixODBC anymore, I
removed the file.

I built postgres from their SRPM, and their packages didn't include the
odbcinst.ini - but it is in their source tree.  I don't know why it's
not in the postgres ODBC package.

Here's my /etc/odbc.ini file for iODBC 3.0.6 (libiodbc):

(Note the [Default] section shouldn't be necessary, and you might try
removing the Trace= and TraceFile= lines if it doesn't work -- I added
those after I had it working.)

;  odbc.ini
[ODBC Data Sources]


Driver = /home/openlink/lib/oplodbc.so.1

I found that the contents of the file didn't matter much either!
(Probably just the Driver= line is important.)  The issue lay in the
ODBC connect statement that I used:

(using the iODBC "odbctest" program):


Obviously, change the database= parameter.

I've read the postgres native ODBC driver doesn't support access through
sockets (which would be nice), so you'll have to start PG listening on a
port.  Use "netstat -a" to check this quickly (on linux or most other

I haven't played with any of the debugging that people suggested yet.
If you want to exchange email about that process afterward, let me know.

Hope this helps.  If not, let me know.  I fought with iODBC|unixODBC +
Postgres for quite some time.

It would seem that my experience confirms what you discovered about the
explicit connect string parameters as well.


Posted on the users mailing list.