Re: Strange interval arithmetic
От | Michael Fuhr |
---|---|
Тема | Re: Strange interval arithmetic |
Дата | |
Msg-id | 20051130182806.GA98044@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Re: Strange interval arithmetic (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Strange interval arithmetic
|
Список | pgsql-hackers |
On Wed, Nov 30, 2005 at 12:37:40PM -0500, Tom Lane wrote: > Michael Fuhr <mike@fuhr.org> writes: > >> I see this behavior back to at least 7.3. I'd guess it's because > >> strtol() indicates overflow by returning LONG_MAX and setting errno > >> to ERANGE, but the code doesn't check for that. > > > Is this worth looking at for the upcoming dot releases? > > 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 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. -- Michael Fuhr
В списке pgsql-hackers по дате отправления: