On Wed, Nov 30, 2005 at 12:37:40PM -0500, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to