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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, pgsql-hackers(at)hub(dot)org
Subject: Re: Re: [GENERAL] +/- Inf for float8's
Date: 2000-08-19 22:33:49
Message-ID: Pine.LNX.4.21.0008172123360.346-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart writes:

> > 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.
>
> Hmm. With Tom Lane's new fmgr interface, you *can* return NULL if you
> spot a NaN result. Maybe that is the best way to go about it; we'll
> stipulate that NaN and NULL are equivalent. And we'll further stipulate
> that if you are messing with NaN then you deserve what you get ;)

I beg to differ, this behaviour would not be correct. Instead, this should
happen:

NULL < NULL => NULL
NULL < 1.0 => NULL
NULL < Nan => NULL
1.0 < NULL => NULL
1.0 < NaN => false
NaN < NULL => NULL
NaN < 1.0 => false

Then all the NaN's sort either all first or all last before or after the
NULLs.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-08-19 22:37:45 Re: Installation layout idea
Previous Message Peter Eisentraut 2000-08-19 22:33:00 Re: Re: [GENERAL] +/- Inf for float8's