Re: greatest/least semantics different between oracle and postgres

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: greatest/least semantics different between oracle and postgres
Дата
Msg-id 12069.1183176942@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: greatest/least semantics different between oracle and postgres  ("Andrej Ricnik-Bay" <andrej.groups@gmail.com>)
Ответы Re: greatest/least semantics different between oracle and postgres  ("Andrej Ricnik-Bay" <andrej.groups@gmail.com>)
Re: greatest/least semantics different between oracle and postgres  (Bruno Wolff III <bruno@wolff.to>)
Re: greatest/least semantics different between oracle and postgres  (Ben <bench@silentmedia.com>)
Список pgsql-general
"Andrej Ricnik-Bay" <andrej.groups@gmail.com> writes:
> On 6/30/07, Bruno Wolff III <bruno@wolff.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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Andrej Ricnik-Bay"
Дата:
Сообщение: Re: greatest/least semantics different between oracle and postgres
Следующее
От: "Andrej Ricnik-Bay"
Дата:
Сообщение: Re: greatest/least semantics different between oracle and postgres