Re: Windows 64 bit warnings - Mailing list pgsql-hackers

From Michael Meskes
Subject Re: Windows 64 bit warnings
Date
Msg-id 20110419134414.GA31777@feivel.credativ.lan
Whole thread Raw
In response to Windows 64 bit warnings  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Sat, Apr 16, 2011 at 08:46:44PM -0400, Andrew Dunstan wrote:
> One is at src/interfaces/ecpg/ecpglib/sqlda.c:231, which is this line:
> 
>    sqlda->sqlvar[i].sqlformat = (char *) (long) PQfformat(res, i);
> 
> I'm not clear about the purpose of this anyway. It doesn't seem to
> be used anywhere, and the comment on the field says it for future

By used you mean inside the postgres right? If so this is not surprising, sqlda
is used to give data to the program using the library.

> use. If we're going to do it, I think it should be cast to a long
> long on Win64, since a char * is 8 bytes there, while a long is only
> 4. But if we really want to store the result from PQfformat() in it,
> why is it a char * at all?

Zoltan, did you see this? Given that you wrote the code it might be good if you
could comment on this.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at googlemail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Warning during PostgreSQL 9.0.4 libpq.dll build on WinXP+MinGW
Next
From: David Fetter
Date:
Subject: Re: pgbench \for or similar loop