Skip site navigation (1) Skip section navigation (2)

Re: Rejection of the smallest int8

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 22:13:58
Message-ID: Pine.LNX.4.30.0111212019560.614-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Tom Lane writes:

> 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.  So the test
> inside the loop that tries to detect overflow would be likely to fail
> on some machines.
> If you can see a way around that, we're all ears ...

Use strtoll/strtoull if available.  They should be on "most" systems

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to


pgsql-hackers by date

Next:From: Peter EisentrautDate: 2001-11-21 22:14:20
Subject: Re: beta3
Previous:From: Bruce MomjianDate: 2001-11-21 21:39:48
Subject: Re: beta3

pgsql-patches by date

Next:From: Tom LaneDate: 2001-11-21 22:15:04
Subject: Re: Rejection of the smallest int8
Previous:From: Peter EisentrautDate: 2001-11-21 22:12:54
Subject: Re: Cross-references (was [PATCHES] PQescapeBytea documentation

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group