From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jean-Luc Lachance <jllachan@nsd.ca>
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 12:14:41 -0400 (EDT)
Message-ID: <200307221614.h6MGEfc23097@candle.pha.pa.us> (raw)
In-Reply-To: <4074.1058854149@sss.pgh.pa.us>
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.
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Is this a TODO?
>
> It'll only take ten minutes to make it a DONE, once we figure out what
> the behavior ought to be. So far I think both Stephan and I argued that
> MIN/MAX ought to treat NaN as larger than all ordinary values, for
> consistency with the comparison operators. That was not the behavior
> Michael wanted, but I don't see that we have much choice given the
> wording of the SQL spec. Does anyone want to argue against that
> definition?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
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: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, jllachan@nsd.ca, mtibbetts@head-cfa.cfa.harvard.edu
Subject: Re: min() and NaN
In-Reply-To: <200307221614.h6MGEfc23097@candle.pha.pa.us>
* 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