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

From Thomas Swan
Subject Re: Re: [GENERAL] +/- Inf for float8's
Date
Msg-id 5.0.0.11.2.20000815115816.020d5be8@tangent.ics.olemiss.edu
Whole thread Raw
In response to Re: Re: [GENERAL] +/- Inf for float8's  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-hackers
>I'm not convinced NaN gives us anything useful, especially given how
>badly it breaks sorting. I've been digging into that code a little,
>and it's not going to be pretty. It strikes me as wrong to embed type
>specific info into the generic sorting routines.
>
>So, anyone have any ideas what NaN would be useful for? Especially given
>we have NULL available, which most (non DB) numeric applications don't.
>
>Ross

Just a wild guess, NaN could be used to indicated invalid numeric 
data.  However, this seems odd because it should have been checked prior to 
being put in the DB.

NULL is no value, +/- infinity could be just that or out of range, unless 
you want NaN to be out of range.   Depending on your scheme for 
representation you could take an out of range value and store it as +/i 
infinity.

These are just suggestions.

Thomas



pgsql-hackers by date:

Previous
From: Jeff MacDonald
Date:
Subject: Re: Security choices...
Next
From: Oliver Seidel
Date:
Subject: NaN