Package: odbc-postgresql Version: 1:08.01.0200-2 Severity: grave Justification: renders package unusable
The odbc driver is not 64 bit clean. While the patch Steve provided to enable it to build on 64 bit systems is great, it doesn't make the driver actually work. In particular the function I ran into the problem with is SQLGetData which continues to take a *SQLINTEGER rather than a *SQLLEN for the indicator. As a result, on 64 bit systems this corrupts the calling application and causes crashes. There is a new upstream version which appears to fix these issues with a little help to actually build. the unixodbc package also provides a PostgreSQL odbc driver which seems to not have these issues, however the drivers in the unixodbc source package are not packaged in debian. The new upstream version 8.02.200 works, but requires a patch to actually build due to some bugs that have since been solved. I'll attach the patch that I used locally. -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-dcc-srv Locale: LANG=en_CA, LC_CTYPE=en_CA (charmap=ISO-8859-1) (ignored: LC_ALL set to en_CA) Versions of packages odbc-postgresql depends on: ii libc6 2.3.6.ds1-11 GNU C Library: Shared libraries ii libcomer 1.39+1.40-WIP-2006.11.14+dfsg-1 common error description library ii libkrb53 1.4.4-6 MIT Kerberos runtime libraries ii libpam0g 0.79-4 Pluggable Authentication Modules l ii libpq4 8.1.8-1 PostgreSQL C client library ii libreadl 5.2-2 GNU readline and history libraries ii libssl0. 0.9.8c-4 SSL shared libraries ii odbcinst 2.2.11-13 Support library and helper program ii zlib1g 1:1.2.3-13 compression library - runtime odbc-postgresql recommends no packages. -- no debconf information
diff -ur clean/psqlodbc-08.02.0200/connection.h psqlodbc-08.02.0200/connection.h --- clean/psqlodbc-08.02.0200/connection.h 2006-10-17 12:18:56.000000000 -0400 +++ psqlodbc-08.02.0200/connection.h 2007-03-05 11:24:01.000000000 -0500 @@ -170,11 +170,13 @@ #define DELETE_CONNLOCK(x) pthread_mutex_destroy(&((x)->slock)) #else #define INIT_CONN_CS(x) -#define INIT_CONN_LOCK(x) -#define TRY_ENTER_CONN_CS(x) +#define INIT_CONNLOCK(x) #define ENTER_CONN_CS(x) +#define CONNLOCK_ACQUIRE(x) +#define TRY_ENTER_CONN_CS(x) #define ENTER_INNER_CONN_CS(x, entered) (0) #define LEAVE_CONN_CS(x) +#define CONNLOCK_RELEASE(x) #define DELETE_CONN_CS(x) #define DELETE_CONNLOCK(x) #endif /* WIN_MULTITHREAD_SUPPORT */ Only in psqlodbc-08.02.0200: debian diff -ur clean/psqlodbc-08.02.0200/odbcapi.c psqlodbc-08.02.0200/odbcapi.c --- clean/psqlodbc-08.02.0200/odbcapi.c 2006-10-17 12:18:56.000000000 -0400 +++ psqlodbc-08.02.0200/odbcapi.c 2007-03-05 10:57:22.000000000 -0500 @@ -1103,8 +1103,8 @@ SQLExtendedFetch( HSTMT hstmt, SQLUSMALLINT fFetchType, - SQLLEN irow, - SQLULEN *pcrow, + SQLROWOFFSET irow, + SQLROWSETSIZE *pcrow, SQLUSMALLINT *rgfRowStatus) { RETCODE ret;