Re: Rejection of the smallest int8

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: sugita(at)sra(dot)co(dot)jp, pgsql-patches(at)postgreSQL(dot)org
Subject: Re: Rejection of the smallest int8
Date: 2001-11-21 15:30:17
Message-ID: 13809.1006356617@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-11-21 15:30:54 Re: beta3
Previous Message Dave Cramer 2001-11-21 15:21:29 Benchmarks

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-11-21 15:32:06 Re: [PATCHES] Version checking when loading psql
Previous Message Tom Lane 2001-11-21 15:12:02 Re: [PATCHES] Version checking when loading psql