Re: Proposal: revert behavior of IS NULL on row types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal: revert behavior of IS NULL on row types
Дата
Msg-id 7825.1469561743@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal: revert behavior of IS NULL on row types  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Proposal: revert behavior of IS NULL on row types  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The concept embodied by "NULL" in the operator "IS [NOT] NULL" is distinct
> from the concept embodied by "NULL" in the operator "IS [NOT] DISTINCT
> FROM".

> In short, the former smooths out the differences between composite and
> non-composite types while the later maintains their differences.  While a
> bit confusing I don't see that there is much to be done about it - aside
> from making the distinction more clear at:
> ​https://www.postgresql.org/docs/devel/static/functions-comparison.html

> Does spec support or refute this distinction in treatment?

AFAICS, the IS [NOT] DISTINCT FROM operator indeed is specified to do the
"obvious" thing when one operand is NULL: you get a simple nullness check
on the other operand.  So I went ahead and documented that it could be
used for that purpose.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: old_snapshot_threshold allows heap:toast disagreement
Следующее
От: Robert Haas
Дата:
Сообщение: Re: bug in citext's upgrade script for parallel aggregates