From: Jean-Luc Lachance <jllachan@nsd.ca>
To: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael S. Tibbetts <mtibbetts@head-cfa.cfa.harvard.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: min() and NaN
Date: Tue, 22 Jul 2003 14:50:11 -0400
Message-ID: <3F1D8763.4BE6DCD7@nsd.ca> (raw)
References: <20030722112906.M39399-100000@megazone.bigpanda.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jllachan@nsd.ca, sszabo@megazone.bigpanda.com, pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, mtibbetts@head-cfa.cfa.harvard.edu
Subject: Re: min() and NaN
In-Reply-To: <3F1D8763.4BE6DCD7@nsd.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox