Thread: unixODBC drivers for PostgreSQL?

unixODBC drivers for PostgreSQL?

From
Jon Schewe
Date:
I'm trying to get unixODBC and PostgreSQL to talk nice, but can't seem
to get it working.  I've seen a few posts on the list of people trying
to do this as well.  Have any of you gotten it to work?

I've got a SuSE 9.1 distribution of Linux.  This contains PostgreSQL
7.4.2, unixODBC 2.2.8 and psqlODBC 07.03.0200.

The unixODBC drivers are installed in /usr/lib/unixODBC and the psqlODBC
drivers are installed in /usr/lib.  I've tried both sets of drivers (as
you can see from the config file below) as well as various source
compiles.  The psqlODBC driver doesn't seem to do much of anything, isql
just goes away eating CPU and there are no messages in the postgresql
logfile.  When I use the unixODBC drivers isql also goes away eating
CPU, however I get the following in my postgresql logfile:
2004-06-16 11:10:04 LOG:  unexpected EOF within message length word

I'm sure I'm authenticating because when I had the authentication setup
wrong earlier and would get a message about IDENT failed.  So now this
seems to be a mismatch in the protocols being used between the ODBC
drivers and PostgreSQL.  Does anyone have any ideas?

Configfile installed with :
odbcinst -i -s -n PostgreSQL -f postgreSQL.ini

/etc/unixODBC/odbcinst.ini is empty and there is nothing in
/tmp/sql.log, it's not even there.

--- postgreSQL.ini ---
[PostgreSQL]
Description         = Postgres on workstation, accessed locally
Driver              = /usr/lib/unixODBC/libodbcpsql.so.2
#Setup               = /usr/lib/unixODBC/libodbcpsqlS.so.1
#Driver = /usr/lib/psqlodbc.so
#Driver =
/usr/src/packages/SOURCES/psqlodbc-07.03.0200/.libs/psqlodbc.so
#Driver =
/usr/src/packages/SOURCES/unixODBC-2.2.8/Drivers/PostgreSQL/.libs/libodbcpsql.so
#Trace               = Yes
TraceFile           = /tmp/sql.log
Database            = richards
Servername          = workstation
UserName            = richards
Password            = richards
Port                = 5432
Protocol            = 7.4.2
ReadOnly            = 0
#RowVersioning       = No
#ShowSystemTables    = No
#ShowOidColumn       = No
#FakeOidIndex        = No
--- end postgreSQL.ini ---


Thanks for any help you can provide.

--
Jon Schewe | http://mtu.net/~jpschewe
GPG signature at http://mtu.net/~jpschewe/gpg.sig.html
For I am convinced that neither death nor life, neither angels
nor demons, neither the present nor the future, nor any
powers, neither height nor depth, nor anything else in all
creation, will be able to separate us from the love of God that
is in Christ Jesus our Lord. - Romans 8:38-39


Attachment

Re: unixODBC drivers for PostgreSQL?

From
Andre Felipe Machado
Date:
Hello,
I only got 07.03.100 to work with Postgresql 7.3.4
The 07.03.200 poped too many problems...
It seems that the .209 is better.
Regards.
Andre Felipe


Re: unixODBC drivers for PostgreSQL?

From
Jon Schewe
Date:
On Fri, Jun 18, 2004 at 05:05:40PM +0000, Andre Felipe Machado wrote:
> Hello,
> I only got 07.03.100 to work with Postgresql 7.3.4
> The 07.03.200 poped too many problems...
> It seems that the .209 is better.

It doesn't appear that 209 is on the ftp site anymore.  It's not under
old or src.  Where might I get it to try?

> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

Oh yes, lots.

--
Jon Schewe | http://mtu.net/~jpschewe
GPG signature at http://mtu.net/~jpschewe/gpg.sig.html
For I am convinced that neither death nor life, neither angels
nor demons, neither the present nor the future, nor any
powers, neither height nor depth, nor anything else in all
creation, will be able to separate us from the love of God that
is in Christ Jesus our Lord. - Romans 8:38-39

Attachment

Re: unixODBC drivers for PostgreSQL?

From
apm35@student.open.ac.uk (apm)
Date:
jpschewe@mtu.net (Jon Schewe) wrote in message news:<1087567614.3272.38.camel@workstation.mn.mtu.net>...
> I'm trying to get unixODBC and PostgreSQL to talk nice, but can't seem
> to get it working.  I've seen a few posts on the list of people trying
> to do this as well.  Have any of you gotten it to work?

No, not with version 3.0 of ODBC. It claims to build ok with version 2.5 but
I need 3.0 due to specific functions that were introduced in that version.
I have version 07.03.0200 of psqlodbc and version 7.4.3 of postgres.

When I build postgres with ./configure --with-odbcver=0x0300 it fails.
This is because the code uses the type SQLHDESC which is a new type in
ODBC version 3.0. However, psqlodbc.h does not define it.
Can anyone help please?

Regards,

Andrew Marlow