Re: Does postgresql-odbc work on 64-bit platforms?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Does postgresql-odbc work on 64-bit platforms?
Date: 2005-12-16 02:47:33
Message-ID: 19500.1134701253@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
>> I just had occasion to build 08.01.0102 on an x86_64 machine, and I
>> noted quite a large number of warnings about "cast from pointer to
>> integer of different size" and vice versa. These are pretty scary.

> If you can help (or can find some Redhat manpower) that would be
> appreciated - I certainly don't have a 64 bit box right now and am
> pretty thin on time as well having committed myself to too many
> projects. Again. :-(

I looked over the warnings and they all seem to arise from casting
pointers to or from SQLUINTEGER. I presume the latter is meant to
be 32 bits, so the failure on 64-bit machines is hardly surprising.
It's not clear to me what the appropriate fixes are --- fixing this
appears to require changing the APIs of the functions involved, and
I don't know what the ramifications would be.

I've attached a list of the current warnings (current as of 08.01.0102
sources).

The two warnings in PGAPI_SetConnectOption definitely look like crash
cases to me. The others might be fixable by changing, eg,
if ((SQLUINTEGER) Value == SQL_OV_ODBC2)
to
if (Value == (PTR) SQL_OV_ODBC2)

regards, tom lane

options.c: In function 'PGAPI_SetConnectOption':
options.c:494: warning: cast to pointer from integer of different size
options.c:500: warning: cast to pointer from integer of different size
odbcapi30.c: In function 'SQLSetEnvAttr':
odbcapi30.c:425: warning: cast from pointer to integer of different size
odbcapi30.c:446: warning: cast from pointer to integer of different size
odbcapi30.c:453: warning: cast from pointer to integer of different size
pgapi30.c: In function 'ARDSetField':
pgapi30.c:479: warning: cast from pointer to integer of different size
pgapi30.c:488: warning: cast from pointer to integer of different size
pgapi30.c:491: warning: cast from pointer to integer of different size
pgapi30.c:536: warning: cast from pointer to integer of different size
pgapi30.c:545: warning: cast from pointer to integer of different size
pgapi30.c:561: warning: cast from pointer to integer of different size
pgapi30.c:578: warning: cast from pointer to integer of different size
pgapi30.c:581: warning: cast from pointer to integer of different size
pgapi30.c:584: warning: cast from pointer to integer of different size
pgapi30.c: In function 'APDSetField':
pgapi30.c:654: warning: cast from pointer to integer of different size
pgapi30.c:663: warning: cast from pointer to integer of different size
pgapi30.c:666: warning: cast from pointer to integer of different size
pgapi30.c:686: warning: cast from pointer to integer of different size
pgapi30.c:695: warning: cast from pointer to integer of different size
pgapi30.c:711: warning: cast from pointer to integer of different size
pgapi30.c:724: warning: cast from pointer to integer of different size
pgapi30.c:730: warning: cast from pointer to integer of different size
pgapi30.c:733: warning: cast from pointer to integer of different size
pgapi30.c: In function 'IPDSetField':
pgapi30.c:819: warning: cast from pointer to integer of different size
pgapi30.c:827: warning: cast from pointer to integer of different size
pgapi30.c:846: warning: cast from pointer to integer of different size
pgapi30.c:855: warning: cast from pointer to integer of different size
pgapi30.c:871: warning: cast from pointer to integer of different size
pgapi30.c:874: warning: cast from pointer to integer of different size
pgapi30.c:877: warning: cast from pointer to integer of different size
pgapi30.c: In function 'PGAPI_SetConnectAttr':
pgapi30.c:1550: warning: cast from pointer to integer of different size
pgapi30.c:1560: warning: cast from pointer to integer of different size
pgapi30.c: In function 'PGAPI_SetStmtAttr':
pgapi30.c:1697: warning: cast from pointer to integer of different size
pgapi30.c:1726: warning: cast from pointer to integer of different size
pgapi30.c:1738: warning: cast from pointer to integer of different size
pgapi30.c:1753: warning: cast from pointer to integer of different size
pgapi30.c:1756: warning: cast from pointer to integer of different size

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Ludek Finstrle 2005-12-16 12:51:08 Re: Next development steps?
Previous Message Jim C. Nasby 2005-12-15 23:16:27 Re: Next development steps?