Re: How to configure iodbc access to local postgres db?

From: Rob Yampolsky <rob(dot)yampolsky(at)encodasystems(dot)com>
To: pgsql-general(at)postgresql(dot)org(dot)pgsql-odbc(at)postgresql(dot)org
Subject: Re: How to configure iodbc access to local postgres db?
Date: 2001-04-20 18:01:45
Message-ID: 3AE07989.93DCA7EE@encodasystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-odbc pgsql-ports

Tried your suggestions, and no luck.

I also went through the exercise of tracing through the odbctest program in
gdb to find out what the

SQLDriverConnect ( ... )
SQL_NO_DATA_FOUND

error in my odbc trace meant. The program did successfuly load my
/usr/lib/libpsqlodbc.so.0 library, and was able to locate and call
functions in it. Specifically, it called SQLAllocateConnect() and got back
SQL_SUCCESS. It also locates and calls SQLDriverConnect(), but gets back
(Duh...) SQL_NO_DATA_FOUND (100). I guess the trace wasn't lying.

So....

What does it mean for SQLDriverConnect() to return 'no data found'. I'm
guessing it means that the ODBC driver was unable to connect to my
postmaster. I guess that could happen for several reasons.

Some guesses:
. The postmaster isn't listening on the 5432 port I have set up in
.odbc.ini. If this were the case, would I be able to run the 'psql'
command-line tool? Does the postgres ODBC driver talk to the postmaster in
a different way than 'psql' does?

. I'm not set up properly to handle TCP connections. I added
"host all <my class C net> 255.255.255.0 trust"
to the default pg_hba.conf file, and there was already a similar entry for
127.0.0.1. Is it possible that local ODBC connections look like they're
coming from somewhere else?

. My postmaster isn't built to handle ODBC. It's a straight binary install
of the MDK 7.2 RPM's, including the postgres ODBC and JDBC interfaces. Is
it possible that MDK builds these things so that they don't work together?

. There's some permission problem. Could that be possible if I'm able (as
the same user) to access this database using 'psql'? Would 'no data found'
be an appropriate error code in this case (I'd think there'd be a more
specific 'access denied'-type error)?

Does anybody out there know (or know where to find) detailed info on how
the postgres odbc driver works? The documentation in the administrators'
guide is strictly for Applix as the client, and mentions that 'you should
be able to get iodbc (or any other driver manager) to work pretty easily'.
Well, I'm sure it's easy once you've got it set up right...

Thanks,
Rob
rob(dot)yampolsky(at)encodasystems(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Hirsch 2001-04-20 18:02:41 Re: [HACKERS] Hardcopy docs available
Previous Message Brett W. McCoy 2001-04-20 17:52:23 Re: Database Connect

Browse pgsql-odbc by date

  From Date Subject
Next Message Rob Yampolsky 2001-04-21 02:40:35 Re: How to configure iodbc access to local postgres db?
Previous Message Przem Kowalczyk 2001-04-20 12:50:22 Postgres 7.1, iODBC and PHP4

Browse pgsql-ports by date

  From Date Subject
Next Message Scott D. Pham 2001-04-20 18:05:00 Errors in Compiling / Configure
Previous Message Hiroshi Inoue 2001-04-20 01:04:40 Re: How to configure iodbc access to local postgres db?