Re: Strange interval arithmetic - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Strange interval arithmetic
Date
Msg-id 29998.1133377306@sss.pgh.pa.us
Whole thread Raw
In response to Re: Strange interval arithmetic  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Strange interval arithmetic  (Michael Fuhr <mike@fuhr.org>)
List pgsql-hackers
Michael Fuhr <mike@fuhr.org> writes:
> On Wed, Nov 30, 2005 at 12:37:40PM -0500, Tom Lane wrote:
>> Sure, send a patch ...

> Any preferences on an approach?  The simplest and easiest to verify
> would be to raise an error for just this particular case; a TODO
> item might be to change how the string is parsed to allow values
> larger than LONG_MAX.

I think the latter would be a feature enhancement and therefore not
good material to back-patch.  Just erroring out seems appropriate
for now.

> I see several calls to strtol() that aren't checked for overflow but
> that might not be relevant to this problem, so I'm thinking this patch
> ought not touch them.  Maybe that's another TODO item.

If it's possible for them to be given overflowing input, they probably
ought to be checked.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: [pgsql-www] Upcoming PG re-releases
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Using multi-row technique with COPY