Re: min() and NaN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
Cc: "Michael S(dot) Tibbetts" <mtibbetts(at)head-cfa(dot)cfa(dot)harvard(dot)edu>, pgsql-sql(at)postgresql(dot)org
Subject: Re: min() and NaN
Date: 2003-07-21 15:43:19
Message-ID: 5212.1058802199@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jean-Luc Lachance <jllachan(at)nsd(dot)ca> writes:
> If a compare with NaN is always false, how about rewriting it as:
> result = ((arg1 < arg2) ? arg2 : arg1).

That just changes the failure mode.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Barry Lind 2003-07-21 18:55:59 Re: Timestamp problem
Previous Message Jean-Luc Lachance 2003-07-21 15:41:43 Re: min() and NaN