Bobspadger / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

PostgreSQL Unicode Driver not able to connect #176

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pyodbc.connect("DRIVER={PostgreSQL 
Unicode};SERVER=servername;DATABASE=databasename;UID=myuser;PWD=mypass")

What is the expected output? What do you see instead?

Expects to connect to my database server. Get this error instead: 

Error Traceback (most recent call last)
/tmp/<ipython console> in <module>()
Error: ('0', '[0] [unixODBC]c (0) (SQLDriverConnectW)')

What version of the product are you using? On what operating system?
Client system:
Ubuntu 11.04 amd64 kernel 2.6.38.2
unixodbc                              2.2.14p2-2ubuntu1
python-pyodbc                         2.1.7-1build1
python2.6                             2.6.6-6ubuntu7
odbc-postgresql                       1:08.03.0200-1.2

Database host system:
Debian 6.0 amd64 kernel 2.6.32-5-amd64 (default debian kernel image)
postgresql-8.4                      8.4.7-0squeeze2

Please provide any additional information below.

Output of /etc/odbcinst.ini
[PostgreSQL ANSI]
Description     = PostgreSQL ODBC driver (ANSI version)
Driver          = /usr/lib/odbc/psqlodbca.so
Setup           = /usr/lib/odbc/libodbcpsqlS.so
Debug           = 0
CommLog         = 1
UsageCount      = 1
Threading       = 2

[PostgreSQL Unicode]
Description     = PostgreSQL ODBC driver (Unicode version)
Driver          = /usr/lib/odbc/psqlodbcw.so
Setup           = /usr/lib/odbc/libodbcpsqlS.so
Debug           = 0
CommLog         = 1
UsageCount      = 1
Threading       = 2

If I connect with the ANSI driver it works as intended.

Original issue reported on code.google.com by rhbl...@gmail.com on 23 May 2011 at 8:07

GoogleCodeExporter commented 9 years ago
Forgot to mention that if I put up a odbc data source and test with isql it 
will connect with the Unicode driver, so it seems to be working when accessed 
without pyodbc.

Original comment by rhbl...@gmail.com on 23 May 2011 at 8:09

GoogleCodeExporter commented 9 years ago
I'm pretty sure this works now.  I run the OS/X PostgreSQL tests with the 
Unicode driver.

Original comment by mkleehammer on 29 Sep 2012 at 6:14

GoogleCodeExporter commented 9 years ago
Brilliant, will check it out!

Original comment by rhbl...@gmail.com on 29 Sep 2012 at 6:20