[unixODBC-dev] SQL_C integer sizes in 64-bit Linux

Nick Gorham nick at lurcher.org
Wed Mar 2 19:52:16 GMT 2005

Kelly Burkhart wrote:

> Does anyone know what the proper C types are for the SQL_C_* constants 
> in ODBC?
> The reason I ask is that in the PostgreSQL driver, SQL_C_SLONG maps to 
> a long, which on x86-64/gcc is a 64-bit integer.  That leaves no SQL_C 
> constant mapping to a 32-bit integer on this platform.
> It seems to me the better binding would be SQL_C_SLONG/int4 and 
> Could any of you ODBC gurus shed some light on this?

AFAIK, that is the way it should go.

SQL_C_LONG is  32 bit, SQL_B_BIGINT is 64 bit.

I will check what the driver is doing.


More information about the unixODBC-dev mailing list