>> Attached is a patch to accept the smallest value of int8.
> This has been proposed before. The problem with it is that it's
> not portable: the C standard does not specify the direction of rounding
> of integer division when the dividend is negative.
BTW, does anyone have a copy of the ANSI C standard to check this?
I have a draft of C99, which says that truncation is towards 0
regardless of the sign, but I think that this is something that was
tightened up in C99; we can't rely on older compilers to follow it.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2001-11-21 15:30:54|
|Subject: Re: beta3|
|Previous:||From: Dave Cramer||Date: 2001-11-21 15:21:29|
pgsql-patches by date
|Next:||From: Bruce Momjian||Date: 2001-11-21 15:32:06|
|Subject: Re: [PATCHES] Version checking when loading psql|
|Previous:||From: Tom Lane||Date: 2001-11-21 15:12:02|
|Subject: Re: [PATCHES] Version checking when loading psql |