From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com> |
Cc: | "Bruno Wolff III" <bruno(at)wolff(dot)to>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: greatest/least semantics different between oracle and postgres |
Date: | 2007-06-30 04:15:42 |
Message-ID: | 12069.1183176942@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com> writes:
> On 6/30/07, Bruno Wolff III <bruno(at)wolff(dot)to> wrote:
>> I was recently doing some stuff with greatest() on oracle (9.2.0.8.0) and
>> noticed that it returned null if ANY of the arguments were null. Out of
>> curiosity I checked postgres' definition of that function and found that it
>> returns null only if ALL of the arguments are null.
> W/o knowing the SQL standard (just from what I'd perceive
> as sensible) I'd say Oracle is broken. :}
Hmm ... I fear Oracle's behavior is more correct, because if any
argument is null (ie, unknown), then who can say what the greatest or
least value is? It's unknown (ie, null). But I suspect our behavior
is more useful. Comments?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrej Ricnik-Bay | 2007-06-30 04:27:12 | Re: greatest/least semantics different between oracle and postgres |
Previous Message | Andrej Ricnik-Bay | 2007-06-30 03:47:49 | Re: greatest/least semantics different between oracle and postgres |