Re: 8.0.0beta1: make check fails on solaris8 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: 8.0.0beta1: make check fails on solaris8
Date
Msg-id 4673.1092231390@sss.pgh.pa.us
Whole thread Raw
In response to 8.0.0beta1: make check fails on solaris8  (Martin Münstermann <mmuenstermann@betrusted.com>)
Responses Re: 8.0.0beta1: make check fails on solaris8
List pgsql-bugs
Martin Münstermann <mmuenstermann@betrusted.com> writes:
> It's even a little more bizarre:
> When I start a fresh psql session, SELECT 'infinity'::float4 just works.
> Then I \i sql/float4.sql, and after that
> template1=# \set VERBOSITY verbose
> template1=# SELECT 'infinity'::float4;
> ERROR:  22P02: invalid input syntax for type real: "infinity"
> LOCATION:  float4in, float.c:330

Wow.  Well, that confirms my suspicion that endptr is bad --- the line
number shows that the complaint is coming from the
junk-at-end-of-the-string test.  But why is it history-dependent?

I wonder if endptr might not be getting set at all in this case.
Could you try adding "endptr = num;" to the code in
src/backend/utils/adt/float.c, that is

/* skip leading whitespace */while (*num != '\0' && isspace((unsigned char) *num))    num++;

+    endptr = num;errno = 0;val = strtod(num, &endptr);
/* did we not see anything that looks like a double? */

at about line 280, and similarly at line 445.  Does that make it
any better?
        regards, tom lane


pgsql-bugs by date:

Previous
From: Theodore Petrosky
Date:
Subject: Re: OSX problem with make check...
Next
From: Fabien COELHO
Date:
Subject: broken bug-report web form