Unix Technical Forum

Re: Odbcapi30.c - 64 bit compiler warning cleanup

This is a discussion on Re: Odbcapi30.c - 64 bit compiler warning cleanup within the pgsql Interfaces odbc forums, part of the PostgreSQL category; --> > -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > Sent: 26 January 2006 15:57 > To: Dave Page > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 02:48 AM
Dave Page
 
Posts: n/a
Default Re: Odbcapi30.c - 64 bit compiler warning cleanup



> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: 26 January 2006 15:57
> To: Dave Page
> Cc: Ludek Finstrle; pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] Odbcapi30.c - 64 bit compiler warning cleanup
>
> "Dave Page" <dpage@vale-housing.co.uk> writes:
> >> From: Ludek Finstrle [mailto:luf@pzkagis.cz]
> >> I don't solve the problem in options.c where 64-bit pointer may
> >> be passwd throught 32-bit number. I don't know how to solve it.

>
> > No nor I. Any chance of a little help with this one please Tom?

>
> I assume that you can't alter the signature of PGAPI_SetConnectOption,
> ie, vParam really has to be SQLUINTEGER and not some other type?


The spec actually says it should be a SQLPOINTER. Changing to that
unleashes a whole barrel of extra fun unfortunately.

> If so, I'd argue that that whole block (the "if (fOption == 30002 &&
> vParam)" stuff) ought to be #ifdef WIN32. It's certainly useless on
> any other platform,


That's a good point - it didn't even cross my mind that that code is
only useful on Windows. Thanks Tom!

> and Microsoft is never going to figure out how
> to 64-bit-ify that pile of junk they call an OS, so no need to bend
> our brains wondering how this would work on 64-bit Windows.


There have been 64bit versions of Windows for Itanium for ages, and
2003/XP have also been readily available now for a few months. That
said, psqlODBC definitely doesn't support 64 bit builds on Windows yet.

Regards, Dave

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

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 02:48 AM
Ludek Finstrle
 
Posts: n/a
Default Re: Odbcapi30.c - 64 bit compiler warning cleanup

> > >> I don't solve the problem in options.c where 64-bit pointer may
> > >> be passwd throught 32-bit number. I don't know how to solve it.

> >
> > > No nor I. Any chance of a little help with this one please Tom?

> >
> > I assume that you can't alter the signature of PGAPI_SetConnectOption,
> > ie, vParam really has to be SQLUINTEGER and not some other type?

>
> The spec actually says it should be a SQLPOINTER. Changing to that
> unleashes a whole barrel of extra fun unfortunately.


I don't think it will be so problematic. I'll try it. It's the best way
to support Win64.

Very good point Tom.

> > and Microsoft is never going to figure out how
> > to 64-bit-ify that pile of junk they call an OS, so no need to bend
> > our brains wondering how this would work on 64-bit Windows.

>
> There have been 64bit versions of Windows for Itanium for ages, and
> 2003/XP have also been readily available now for a few months. That
> said, psqlODBC definitely doesn't support 64 bit builds on Windows yet.


I have no access to 64-bit windows. I have no 64-bit compiler for win :-(
We have to hope that someone will donate for 64-bit Windows version or
someone with access to 64-bit win with compiler will join us.

Regards,

Luf

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2008, 02:48 AM
Ludek Finstrle
 
Posts: n/a
Default Re: Odbcapi30.c - 64 bit compiler warning cleanup

> > > >> I don't solve the problem in options.c where 64-bit pointer may
> > > >> be passwd throught 32-bit number. I don't know how to solve it.
> > >
> > > > No nor I. Any chance of a little help with this one please Tom?
> > >
> > > I assume that you can't alter the signature of PGAPI_SetConnectOption,
> > > ie, vParam really has to be SQLUINTEGER and not some other type?

> >
> > The spec actually says it should be a SQLPOINTER. Changing to that
> > unleashes a whole barrel of extra fun unfortunately.

>
> I don't think it will be so problematic. I'll try it. It's the best way
> to support Win64.


Here is my result. Patch attached. I have no 64-bit box ready at hand here.
I will test it on 64-bit box tomorrow.

Please review and comment

Luf


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-16-2008, 02:48 AM
Ludek Finstrle
 
Posts: n/a
Default Re: Odbcapi30.c - 64 bit compiler warning cleanup

> > > The spec actually says it should be a SQLPOINTER. Changing to that
> > > unleashes a whole barrel of extra fun unfortunately.

> >
> > I don't think it will be so problematic. I'll try it. It's the best way
> > to support Win64.

>
> Here is my result. Patch attached. I have no 64-bit box ready at hand here.
> I will test it on 64-bit box tomorrow.


I find one problem. New patch attached. I get no warning with this one.

Please review and comment

Luf


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-16-2008, 02:48 AM
Tom Lane
 
Posts: n/a
Default Re: Odbcapi30.c - 64 bit compiler warning cleanup

Ludek Finstrle <luf@pzkagis.cz> writes:
> RETCODE SQL_API
> PGAPI_SetConnectOption(HDBC hdbc,
> SQLUSMALLINT fOption,
> ! SQLUINTEGER vParam)
> {
> CSTR func = "PGAPI_SetConnectOption";
> ConnectionClass *conn = (ConnectionClass *) hdbc;
> --- 314,320 ----
> RETCODE SQL_API
> PGAPI_SetConnectOption(HDBC hdbc,
> SQLUSMALLINT fOption,
> ! SQLPOINTER vParam)
> {
> CSTR func = "PGAPI_SetConnectOption";
> ConnectionClass *conn = (ConnectionClass *) hdbc;


The problem with this is that it creates an ABI breakage. I don't think
we can just push this out as a bug fix --- it would require a major
version bump, no?

regards, tom lane

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:55 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com