Does postgresql-odbc work on 64-bit platforms?

Does postgresql-odbc work on 64-bit platforms?

am 15.12.2005 05:08:03 von Tom Lane

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.
Has anyone tested recent ODBC on a 64-bit machine? Do you need more
info/help in looking at this?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

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

am 15.12.2005 09:53:47 von Dave Page

=20

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org=20
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Tom Lane
> Sent: 15 December 2005 04:08
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Does postgresql-odbc work on 64-bit platforms?
>=20
> 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.
> Has anyone tested recent ODBC on a 64-bit machine? Do you need more
> info/help in looking at this?

Peter is pretty much the only one who has been working on that, and that
was some months ago. I did clean up a bunch of internal inconsistencies
the other day (the ones that were reported on OSX recently iirc), but
that was just making sure that the same types were used on
internal/external API functions.

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. :-(

Regards, Dave.


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

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

am 16.12.2005 03:47:33 von Tom Lane

"Dave Page" 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

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

am 16.12.2005 14:27:55 von Ludek Finstrle

> >> 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

This is same problem for me. I have no 64 bit box right now :-(
Maybe I'll have access to linux box after Xmas (if I enforce dual
boot on new notebook).

> 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)

Thanks, this and the list help me a lot

Luf

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

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

am 16.12.2005 14:49:20 von Dave Page

=20

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org=20
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: 16 December 2005 13:28
> To: Tom Lane
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Does postgresql-odbc work on 64-bit platforms?
>=20
> > >> I just had occasion to build 08.01.0102 on an x86_64=20
> machine, and I
> > >> noted quite a large number of warnings about "cast from=20
> pointer to
> > >> integer of different size" and vice versa. These are=20
> pretty scary.
> >=20
> > > 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
>=20
> This is same problem for me. I have no 64 bit box right now :-(
> Maybe I'll have access to linux box after Xmas (if I enforce dual
> boot on new notebook).

I can give you access to a linux box if you like, just not a 64 bit one.

Plus of course, you do have a shell account of pgfoundry.org.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

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

am 16.12.2005 16:35:51 von Ludek Finstrle

> > > > 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
> >
> > This is same problem for me. I have no 64 bit box right now :-(
> > Maybe I'll have access to linux box after Xmas (if I enforce dual
> > boot on new notebook).
>
> I can give you access to a linux box if you like, just not a 64 bit one.

Oh, my head was faster than hands ... I mean 64 bit linux box ;-)
I have access to linux. I'd like linux more than windos ,,,
The server I had point is linux box.

> Plus of course, you do have a shell account of pgfoundry.org.

This I don't know. Where can I find more info about it?

Thanks,

Luf

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

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

am 16.12.2005 17:32:38 von Dave Page

=20

> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz]=20
> Sent: 16 December 2005 15:36
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Does postgresql-odbc work on 64-bit platforms?
>=20
> > > > > If you can help (or can find some Redhat manpower)=20
> that would be
> > > > > appreciated - I certainly don't have a 64 bit box=20
> right now and am
> > >=20
> > > This is same problem for me. I have no 64 bit box right now :-(
> > > Maybe I'll have access to linux box after Xmas (if I enforce dual
> > > boot on new notebook).
> >=20
> > I can give you access to a linux box if you like, just not=20
> a 64 bit one.

Oh right - you have a 64 bit notebook then? Nice...

> Oh, my head was faster than hands ... I mean 64 bit linux box ;-)
> I have access to linux. I'd like linux more than windos ,,,
> The server I had point is linux box.
>=20
> > Plus of course, you do have a shell account of pgfoundry.org.
>=20
> This I don't know. Where can I find more info about it?

No idea. Try ssh'ing to it.

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

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

am 16.12.2005 22:51:25 von jnasby

On Fri, Dec 16, 2005 at 04:32:38PM -0000, Dave Page wrote:
> > > Plus of course, you do have a shell account of pgfoundry.org.
> >
> > This I don't know. Where can I find more info about it?
>
> No idea. Try ssh'ing to it.

ssh shell.pgfoundry.org
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

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

am 23.12.2005 13:40:57 von Anoop Kumar

Hi,

I tried building 08.01.0102 on an x86_64 Solaris machine (SunOS 5.10). I
did not test it extensively, but could successfully carry out some basic
tests.

I used the following combination:

1. psqlodbc 08.01.0102
2. unixODBC 2.2.11
3. PostgreSQL 8.0.4

(I did not use the -m64 compiler option)

Regards,
Anoop

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-
> owner@postgresql.org] On Behalf Of Jim C. Nasby
> Sent: Saturday, December 17, 2005 3:21 AM
> To: Dave Page
> Cc: Ludek Finstrle; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Does postgresql-odbc work on 64-bit platforms?
>=20
> On Fri, Dec 16, 2005 at 04:32:38PM -0000, Dave Page wrote:
> > > > Plus of course, you do have a shell account of pgfoundry.org.
> > >
> > > This I don't know. Where can I find more info about it?
> >
> > No idea. Try ssh'ing to it.
>=20
> ssh shell.pgfoundry.org
> --
> Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
> Pervasive Software http://pervasive.com work: 512-231-6117
> vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
>=20
> ---------------------------(end of
broadcast)---------------------------
> TIP 6: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

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

am 23.12.2005 13:50:04 von Ludek Finstrle

> (I did not use the -m64 compiler option)

Does it mean that you compiled 32-bit binary? I don't know much
about 64-bit environment and compiling so please be patient with me.

Did you get same warnings as Tom?

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

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

am 29.12.2005 06:53:28 von Anoop Kumar

Hi Ludek,

Previously, I replied directly to you without copying it to the list!
That time they were 32 bit binaries on a 64 bit Solaris platform.

Again, just for your information, I could test the following combination
successfully:

1. psqlodbc 08.01.0102 (64 bit binary)
2. unixODBC 2.2.11 (64 bit binary)
3. PostgreSQL 8.0.4 (64 bit binary)


I am including the previous mail for other's reference.
------------------------------------------------------------ ------------
-
> Does it mean that you compiled 32-bit binary? I don't know much about=20
> 64-bit environment and compiling so please be patient with me.
=09
Yes, I compiled 32 bit binaries, and it is running on a 64 bit platform.
There is nothing great in it, but I just wanted to check out whether it
was do-able (as Dave says :-))=20

> Did you get same warnings as Tom?

No, I did not get them with a 32 bit build (That's obvious because there
was no 32 <-> 64 bit pointer conversion). But when I tried building a 64
bit binary, I got the same warnings. I could not complete the 64 bit
build because my ODBC and libpq libraries were 32 bit.=20
------------------------------------------------------------ ------------
-

Regards
Anoop

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-
> owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: Friday, December 23, 2005 6:20 PM
> To: Anoop Kumar
> Cc: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Does postgresql-odbc work on 64-bit platforms?
>=20
> > (I did not use the -m64 compiler option)
>=20
> Does it mean that you compiled 32-bit binary? I don't know much
> about 64-bit environment and compiling so please be patient with me.
>=20
> Did you get same warnings as Tom?
>=20
> Regards,
>=20
> Luf
>=20
> ---------------------------(end of
broadcast)---------------------------
> TIP 6: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq