Re: [PATCHES] Rejection of the smallest int8 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Rejection of the smallest int8
Date
Msg-id 13809.1006356617@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
I said:
>> 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

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: beta3
Next
From: teg@redhat.com (Trond Eivind Glomsrød)
Date:
Subject: Re: beta3