Dennis Bjorklund <[EMAIL PROTECTED]> writes:
> When UNSAFE_FLOATS is defined there is a check that float results are 
> within the min and max limits, which excludes values like 'Infinity', 
> '-Infinity' and 'Nan'.

> Is the above something from the SQL standard or just a bug?

I think it was probably reasonable when the code was written (I'd guess
this goes back to very early 90s).  Nowadays, IEEE float math is nearly
universal, and we would be offering better functionality if we allowed
access to Infinity and Nan by default.  So I'd vote for ripping out the
range check, or at least reversing the default state of UNSAFE_FLOATS.

We might end up with two sets of regression expected files, one for
machines that do not support NaN, but that seems acceptable to me.

A variant idea is to try to get configure to detect Infinity/NaN support
and set UNSAFE_FLOATS only if it's there.  But I don't know if we can do
that without a run-time check, which Peter probably will complain about...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to