Re: greatest/least semantics different between oracle and postgres - Mailing list pgsql-general

From Gregory Stark
Subject Re: greatest/least semantics different between oracle and postgres
Date
Msg-id 87zm2heaxm.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: greatest/least semantics different between oracle and postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: greatest/least semantics different between oracle and postgres  (Bruce Momjian <bruce@momjian.us>)
Re: greatest/least semantics different between oracle and postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
"Tom Lane" <tgl@sss.pgh.pa.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


pgsql-general by date:

Previous
From: Gregory Stark
Date:
Subject: Re: greatest/least semantics different between oracle and postgres
Next
From: "Dave Page"
Date:
Subject: Re: postgressqlnot support inwindows 2000