Marti Raudsepp <marti(at)juffo(dot)org> writes:
> On Wed, Dec 21, 2011 at 18:21, Marti Raudsepp <marti(at)juffo(dot)org> wrote:
>> I think the least invasive fix, as proposed by Jeroen, is to fail only
>> when ERANGE is set *and* the return value is 0.0 or +/-HUGE_VAL.
>> Reading relevant specifications, this seems to be a fairly safe
>> assumption. That's what the attached patch does.
> Oops, now attached the patch too.
Applied with minor revisions. Notably, after staring at the code a bit
I got uncomfortable with its assumption that pg_strncasecmp() cannot
change errno, so I fixed it to not assume that. Also, on some platforms
HUGE_VAL isn't infinity but the largest finite value, so I made the
range tests be like ">= HUGE_VAL" not just "== HUGE_VAL". I know the
man page for strtod() specifies it should return exactly HUGE_VAL for
overflow, but who's to say that <math.h> is on the same page as the
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Peter Eisentraut||Date: 2012-02-01 18:19:24|
|Subject: Re: psql case preserving completion|
|Previous:||From: Peter Eisentraut||Date: 2012-02-01 18:13:29|
|Subject: Re: disable prompting by default in createuser|