Re: Pg 7.2.3 int8 value out of range - Mailing list pgsql-bugs

From Brian Macy
Subject Re: Pg 7.2.3 int8 value out of range
Date
Msg-id 3DAF8BE0.8060500@macykids.net
Whole thread Raw
In response to Pg 7.2.3 int8 value out of range  (Brian Macy <bmacy@macykids.net>)
List pgsql-bugs
Debian is 32bit user land.
boaz:~# file /usr/lib/postgresql/bin/postgres
/usr/lib/postgresql/bin/postgres: ELF 32-bit MSB executable, SPARC,
version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared
libs), stripped

Since it is debian it's prebuilt but i'll try building it myself....

boaz:~/postgresql-7.2.3# gcc -v
Reading specs from /usr/lib/gcc-lib/sparc-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)


 From src/lib/pg_config.h
/* Set to 1 if type "long int" works and is 64 bits */
/* #undef HAVE_LONG_INT_64 */

/* Set to 1 if type "long long int" works and is 64 bits */
/* #undef HAVE_LONG_LONG_INT_64 */

/* Set to 1 if type "long long int" constants should be suffixed by LL */
/* #undef HAVE_LL_CONSTANTS */

/* Define this as the appropriate snprintf format for 64-bit ints, if any */
#define INT64_FORMAT "%ld"

/*
  * We need a #define symbol for sizeof(Datum) for use in some #if tests.
  */
#define SIZEOF_DATUM 4



Brian Macy


Lamar Owen wrote:
> On Thursday 17 October 2002 09:28 pm, Tom Lane wrote:
>
>>Brian Macy <bmacy@macykids.net> writes:
>>
>>>Only excepts 32bit values and not 64bit. Endian issue?
>>>This is on sparc linux.
>>
>
> Specifically Debian.  Aurora SPARC Linux does not suffer from this problem.
> On Aurora, the userland is 32 bit -- is it possible Debian has a 64 bit
> userland?  As I detailed in my previous email on this subject, I cannot
> reproduce the problem on Aurora SPARC Linux build 0.42, which is based on Red
> Hat 7.3.
>
>
>>Hmm, did configure find any working 64bit int type?  Let's see this part
>>of your src/include/pg_config.h file:
>
>
>>/* Set to 1 if type "long int" works and is 64 bits */
>>/* #undef HAVE_LONG_INT_64 */
>
>
>>/* Set to 1 if type "long long int" works and is 64 bits */
>>#define HAVE_LONG_LONG_INT_64
>
>
>>/* Set to 1 if type "long long int" constants should be suffixed by LL */
>>#define HAVE_LL_CONSTANTS 1
>
>
>>/* Define this as the appropriate snprintf format for 64-bit ints, if any
>>*/ #define INT64_FORMAT "%lld"
>
>
> For Aurora, those lines, along with some others, are:
> /* Set to 1 if type "long int" works and is 64 bits */
> /* #undef HAVE_LONG_INT_64 */
>
> /* Set to 1 if type "long long int" works and is 64 bits */
> #define HAVE_LONG_LONG_INT_64
>
> /* Set to 1 if type "long long int" constants should be suffixed by LL */
> #define HAVE_LL_CONSTANTS 1
>
> /* Define this as the appropriate snprintf format for 64-bit ints, if any */
> #define INT64_FORMAT "%lld"
>
> /*
>  * We need a #define symbol for sizeof(Datum) for use in some #if tests.
>  */
> #define SIZEOF_DATUM 4
>
> /*
>  * These must be defined as the alignment requirement (NOT the size) of
>  * each of the basic C data types (except char, which we assume has align 1).
>  * MAXIMUM_ALIGNOF is the largest alignment requirement for any C data type.
>  * ALIGNOF_LONG_LONG_INT need only be defined if HAVE_LONG_LONG_INT_64 is.
>  */
> #define ALIGNOF_SHORT 2
> #define ALIGNOF_INT 4
> #define ALIGNOF_LONG 4
> #define ALIGNOF_LONG_LONG_INT 8
> #define ALIGNOF_DOUBLE 8
> #define MAXIMUM_ALIGNOF 8
>
> This was built with the RPM spec file using the 'sparc32' utility that builds
> the sun4 32bit userland executables.

pgsql-bugs by date:

Previous
From: Lamar Owen
Date:
Subject: Re: Pg 7.2.3 int8 value out of range
Next
From: Brian Macy
Date:
Subject: Re: Pg 7.2.3 int8 value out of range