Re: BUG #15080: ecpg on windows doesn't define HAVE_LONG_LONG_INT - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15080: ecpg on windows doesn't define HAVE_LONG_LONG_INT
Date
Msg-id 30158.1526656072@sss.pgh.pa.us
Whole thread Raw
In response to RE: BUG #15080: ecpg on windows doesn't define HAVE_LONG_LONG_INT  (Huong Dangminh <huo-dangminh@ys.jp.nec.com>)
List pgsql-bugs
Huong Dangminh <huo-dangminh@ys.jp.nec.com> writes:
>> Attached test patch works fine in Windows, but in Linux system the
>> sqlda->sqlvar[i].sqltype return ECPGt_long but not ECPGt_long_long (as
>> expected) when reference to bigint column.
>> Is this another problem in linux? Or am I wrong something?

That would depend on what platform you're running on: if it's 64-bit
then "long int" is probably 64 bits wide, making that a perfectly valid
answer.

AIUI, the idea in ecpg is to support "long long int" program variables
if the compiler has such a type, without any particular assumptions about
how wide that type is.  But whether the SQL type int8 maps to long or
long long is going to be platform-specific, which evidently is another
hurdle to testing anything here :-(

            regards, tom lane


pgsql-bugs by date:

Previous
From: Dave Cramer
Date:
Subject: Re: JDBC problem in 10.3 / 10.4
Next
From: Tom Lane
Date:
Subject: Re: BUG #15080: ecpg on windows doesn't define HAVE_LONG_LONG_INT