Re: Re: [GENERAL] +/- Inf for float8's - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [GENERAL] +/- Inf for float8's
Date
Msg-id 23801.991513887@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: [GENERAL] +/- Inf for float8's  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Re: [GENERAL] +/- Inf for float8's
List pgsql-hackers
[ continuing a discussion from last August ]

Peter Eisentraut <peter_e@gmx.net> writes:
> Bruce Momjian writes:
>> My assumption is that we never came up with any solution to this, right?

> It stopped when we noticed that proper support for non-finite values will
> break indexing, because the relational trichotomy doesn't hold.

I believe that's not a problem anymore.  The current form of the float
comparison functions will perform sorting and comparisons according to
the sequence
-infinity < normal values < infinity < NaN < NULL

with all NaNs treated as equal.  This may not be exactly what an IEEE
purist would like, but given that we have to define *some* consistent
sort order, it seems as reasonable as we can get.

Accordingly, I suggest that Ross go back to work on persuading the code
to treat infinities and NaNs properly in other respects.  IIRC, there
are still open issues concerning whether we still need/want
CheckFloat8Val/CheckFloat4Val, what the I/O conversion functions should
do on non-IEEE machines, etc.  They all seemed soluble, though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: Re: Interesting Atricle
Next
From: Peter Eisentraut
Date:
Subject: Re: Re: [GENERAL] +/- Inf for float8's