Re: min() and NaN
Jean-Luc Lachance <jllachan@nsd.ca>
From: Jean-Luc Lachance <jllachan@nsd.ca>
To: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Tom Lane <tgl@sss.pgh.pa.us>, "Michael S. Tibbetts" <mtibbetts@head-cfa.cfa.harvard.edu>, pgsql-sql@postgresql.org
Date: 2003-07-22T18:50:11Z
Lists: pgsql-sql
Hey! here is a (stupid maybe) idea. Why not disallow 'NaN' for a float? JLL Stephan Szabo wrote: > > On Tue, 22 Jul 2003, Bruce Momjian wrote: > > > Well, my 2 cents is that though we consider NULL when ordering via ORDER > > BY, we ignore it in MAX because it really isn't a value, and NaN seems > > to be similar to NULL. > > > > When doing ORDER BY, we have to put the NULL value somewhere, so we put > > it at the end, but with aggregates, we aren't required to put the NULL > > somewhere, so we ignore it. Should that be the same for NaN? I just > > don't see how we can arbitrarly say it is greater/less than other > > values. > > But we already do. When doing a less than/greater than comparison, 'NaN' > is considered greater than normal values which is different from NULL > which returns unknown for both.