On Tue, Aug 10, 2004 at 03:23:33PM -0400, Tom Lane wrote:
> andrea.martano@lighthousetc.net writes:
> > attached are the regression.out and regression.diffs files from make check on a
> > Ultra 2 dual 300MHz CPU running Solaris 9 OS.
>
> This seems quite bizarre: ' -INFINiTY ' works but
> 'infinity' does not? Please try in psql
>
> \set VERBOSITY verbose
> SELECT 'infinity'::float4;
>
> and send along the output.
>
> My best guess about it is that strtod() is actively broken on your
> platform, and is recognizing the "infinity" input but returning an
> incorrect endptr. I seem to recall that we've heard of such bugs
> before. Can you check for any updates from Sun that might affect
> strtod()?
strtod() on Solaris has long returned the wrong endptr when parsing
"infinity". Somebody asked about it in comp.unix.solaris in 1995
and I asked again this morning:
http://groups.google.com/groups?&threadm=4118e611%241_3%40omega.dimensional.com
The response indicates that it's a bug fixed in Solaris 10
but probably not released as a patch in earlier versions.
Here's what I get when I run the above commands using a recently
CVS'ed 8.0.0beta1 on Solaris 9. Interestingly, it works the first
time but not afterwards, perhaps due to the bogus endptr pointing
to memory that's initially zeroed but that gets filled before
subsequent queries.
test=> \set VERBOSITY verbose
test=> SELECT 'infinity'::float4;
float4
----------
Infinity
(1 row)
test=> SELECT 'infinity'::float4;
ERROR: 22P02: invalid input syntax for type real: "infinity"
LOCATION: float4in, float.c:330
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/