X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id E3F52D1C941 for ; Tue, 22 Jul 2003 16:14:56 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 49191-07 for ; Tue, 22 Jul 2003 16:14:55 +0000 (GMT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 78426D1C4C8 for ; Tue, 22 Jul 2003 13:14:51 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h6MGEfc23097; Tue, 22 Jul 2003 12:14:41 -0400 (EDT) From: Bruce Momjian Message-Id: <200307221614.h6MGEfc23097@candle.pha.pa.us> Subject: Re: min() and NaN In-Reply-To: <4074.1058854149@sss.pgh.pa.us> To: Tom Lane Date: Tue, 22 Jul 2003 12:14:41 -0400 (EDT) Cc: Jean-Luc Lachance , "Michael S. Tibbetts" , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/321 X-Sequence-Number: 14435 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 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