Обсуждение: Does postgresql-odbc work on 64-bit platforms?

Поиск
Список
Период
Сортировка

Does postgresql-odbc work on 64-bit platforms?

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

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

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [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?
>
> 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.


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

От
Tom Lane
Дата:
"Dave Page" <dpage@vale-housing.co.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

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

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

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

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [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?
>
> > >> 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 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.

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

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

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

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz]
> 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?
>
> > > > > 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 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.
>
> > 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.

Regards, Dave

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

От
"Jim C. Nasby"
Дата:
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

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

От
"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?
>
> 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?

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

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

От
"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
> 64-bit environment and compiling so please be patient with me.

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

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

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