[Devel] odbc db driver and postgresql

Victor Gamov vit at lipetsk.ru
Tue Apr 17 17:39:10 CEST 2007


Henning Westerholt wrote:
> Hello,
> 
> after a somewhat lengthy debug session with Brent Thomson at last Friday on 
> IRC, i just want to mention that there a issues with openser-1.1 to connect 
> to posgresql 8.1 with postgresql-odbc 8.0. 
> 
> The first connection to the db is fine, but then some version mismatch 
> problems occurs, and the odbc driver returns a SQL_SUCCESS_WITH_INFO code, 
> and the connection fails as openser go to an error condition.
> 
> This handling of SQL_SUCCESS_WITH_INFO (my_con.c, line 142) is a not optimal, 
> as it could signal a non fatal minor issue and also a fatal error. 
> 
> He try to comment out this check, but then he get another error about 
> unterminated quoted strings.. After that he decide to give 1.2 a try and use 
> the native postgresql driver. 
> 
> Have anybody been successfully used the odbc driver with postgresql? Or is 
> this combination not supported?

We use unixODBC to connect to MSSQL (unixODBC use freetds driver to make 
  connection). Connection really success but SQL_SUCCESS_WITH_INFO 
returned. We comment "goto err" on line 147 in my_con.c and everything 
works fine. I did not do tests but SQL_SUCCESS_WITH_INFO is not error 
IMHO. MSSQL for example return some info about connection but it is not 
error condition.

-- 
CU,
Victor Gamov



More information about the Devel mailing list