Thread: 64 bit integers
Hi! I wonder if you can use 64 bit integers with postgresql? I have checked around a little. It seems like that postgresql supports 64 bit integers, but the odbc driver does not. Is this correct, or is there a postgresql odbc implementation for 64 bit integers? Any suggestions on how to proceed? Thanks for your help! Sincerely, Christian Bucanac
> -----Original Message----- > From: Christian Bucanac [mailto:christian.bucanac@mindark.com] > Sent: 10 April 2001 14:57 > To: 'pgsql-odbc@postgresql.org' > Subject: [ODBC] 64 bit integers > > > Hi! > I wonder if you can use 64 bit integers with postgresql? I > have checked > around a little. It seems like that postgresql supports 64 > bit integers, but > the odbc driver does not. Is this correct, or is there a > postgresql odbc > implementation for 64 bit integers? Any suggestions on how to > proceed? > Thanks for your help! > Sincerely, > Christian Bucanac Unless I've completely go the wrong end of the stick, int8 is a 64 bit integer (the 8 refering to 8 bytes). The ODBC driver has correctly support int8 since v7.01.0001 if I remember correctly (it treats the type as SQLBIGINT). The latest version (v07.01.0004) is at ftp://ftp.postgresql.org/pub/odbc Regards, Dave.
Hi! I posted earlier a question about int8 and ODBC, see below. I got the answer that int8 works with ODBC driver version 07.01.0001 and later. The problem is that I can not make it work. I use postgres version 6.4 with ODBC driver version 07.01.00.04. Everyting works fine, but not with int8. When I try to bind an int8 with: SQLHSTMT lStatementHandle; SQLINTEGER lMetadata; SQLBIGINT lInt64; SQLBindCol(lStatementHandle, 1, SQL_C_SBIGINT, &lInt64, sizeof(lInt64), &lMetadata); SQLBindCol returns SQL_ERROR and when I run SQLGetDiagRec on the statement handle I get the following information: SQLState: S1003 (meaning Invalid application buffer type) NativeErrorPointer: 0 MessageText: [Microsoft][ODBC Driver Manager] Driver does not support this parameter Do you know what I am doing wrong? Thanks for your help! Sincerely, Christian Bucanac -----Original Message----- From: Christian Bucanac [mailto:christian.bucanac@mindark.com] Sent: den 10 april 2001 15:57 To: 'pgsql-odbc@postgresql.org' Subject: [ODBC] 64 bit integers Hi! I wonder if you can use 64 bit integers with postgresql? I have checked around a little. It seems like that postgresql supports 64 bit integers, but the odbc driver does not. Is this correct, or is there a postgresql odbc implementation for 64 bit integers? Any suggestions on how to proceed? Thanks for your help! Sincerely, Christian Bucanac ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Christian Bucanac wrote: > > Hi! > > I posted earlier a question about int8 and ODBC, see below. I got the answer > that int8 works with ODBC driver version 07.01.0001 and later. The problem > is that I can not make it work. I use postgres version 6.4 with ODBC driver > version 07.01.00.04. Everyting works fine, but not with int8. When I try to > bind an int8 with: > > SQLHSTMT lStatementHandle; > SQLINTEGER lMetadata; > SQLBIGINT lInt64; > SQLBindCol(lStatementHandle, 1, SQL_C_SBIGINT, &lInt64, sizeof(lInt64), > &lMetadata); > > SQLBindCol returns SQL_ERROR and when I run SQLGetDiagRec on the statement > handle I get the following information: > SQLState: S1003 (meaning Invalid application buffer type) It seems that version 3.0 or later is required to handle SQL_C_SBIGINT. Unfortunately psqlodbc's driver version is 2.5. regards, Hiroshi Inoue