pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: 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 11:32:36 -0700 (PDT)
Message-ID: <20030722112906.M39399-100000@megazone.bigpanda.com> (raw)
In-Reply-To: <200307221614.h6MGEfc23097@candle.pha.pa.us>


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.




view thread (17+ messages)  latest in thread

Message-ID: <20030722112906.M39399-100000@megazone.bigpanda.com>
Permalink:  ../20030722112906.M39399-100000@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20030722112906.M39399-100000@megazone.bigpanda.com

 · 

reply

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: sszabo@megazone.bigpanda.com, 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: <20030722112906.M39399-100000@megazone.bigpanda.com>

* 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