Re: greatest/least semantics different between oracle and postgres

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Ben" <bench(at)silentmedia(dot)com>, "PostgreSQL General \(\(EN\)\)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: greatest/least semantics different between oracle and postgres
Date: 2007-06-30 15:09:25
Message-ID: 87zm2heaxm.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> GREATEST/LEAST aren't in the spec, so there's not much help there.
>
> Except ... if they ever do get added to the spec, what do you think
> the spec will say? The odds it'd contradict Oracle seem about nil.

Fwiw even in the min/max/sum case the spec is moving away from having
aggregates ignore NULL values. You now get a warning in Oracle if your
aggregate includes any NULL inputs.

Actually I think it's not exactly a warning but a weird kind of non-fatal
error. You still get your result set but the driver treats it as an error
which has to be explicitly handled to see the results. I'm not entirely clear
on what's going on though. I know that there was some version of their sql
command-line tool which *didn't* handle it and therefore treated it as a fatal
error and that pissed off a lot of people. I think it now prints the warning
and the result set.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2007-06-30 15:14:05 Re: postgressqlnot support inwindows 2000
Previous Message Gregory Stark 2007-06-30 15:05:15 Re: greatest/least semantics different between oracle and postgres