Re: Strange interval arithmetic
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: Michael Fuhr <mike(at)fuhr(dot)org>
- Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
- Subject: Re: Strange interval arithmetic
- Date: Wed, 30 Nov 2005 14:01:46 -0500
- Message-id: <29998(dot)1133377306(at)sss(dot)pgh(dot)pa(dot)us>
Michael Fuhr <mike(at)fuhr(dot)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
Home |
Main Index |
Thread Index