Re: Re: [GENERAL] +/- Inf for float8's

From: Thomas Swan <tswan-lst(at)tangent(dot)ics(dot)olemiss(dot)edu>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: Re: [GENERAL] +/- Inf for float8's
Date: 2000-08-15 17:07:39
Message-ID: 5.0.0.11.2.20000815115816.020d5be8@tangent.ics.olemiss.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Poul L. Christiansen 2000-08-15 17:17:46 Re: Open Source Database Routs Competition in New Benchmark Tests
Previous Message Timothy H. Keitt 2000-08-15 16:57:30 Re: Re: [GENERAL] +/- Inf for float8's