Re: Checking for overflow of integer arithmetic - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: Checking for overflow of integer arithmetic
Date
Msg-id 20041003232942.GA24542@wolff.to
Whole thread Raw
In response to Checking for overflow of integer arithmetic  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, Oct 03, 2004 at 15:38:52 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 1. Does anyone object to applying this for 8.0?  I think we already had
> consensus that it's a good idea, but if not now's the time to speak up.
> (There are a couple of regression tests that fail and will need to be
> adjusted, if that influences anyone's thinking.)

I think this should go in. I think not detecting overflow is really a bug.

> 2. For the int2 and int8 operators, should we stick to a one-size-fits-all
> message "integer out of range", or be more specific: "smallint out of
> range" and "bigint out of range"?  The existing messages are not
> completely consistent about this.  I'm inclined to go with mentioning
> the specific type but I'm not dead set on it.

I think giving the type info will be helpful for debugging.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Mislabeled timestamp functions (was Re: [SQL] [NOVICE] date_trunc'd timestamp index possible?)
Next
From: Gaetano Mendola
Date:
Subject: Re: Checking for overflow of integer arithmetic