Re: WIP json generation enhancements

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP json generation enhancements
Дата
Msg-id 12024.1353960344@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP json generation enhancements  (Hannu Krosing <hannu@2ndQuadrant.com>)
Ответы Re: WIP json generation enhancements : strange IS NULL behaviour  (Hannu Krosing <hannu@2ndQuadrant.com>)
Re: WIP json generation enhancements  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hannu Krosing <hannu@2ndQuadrant.com> writes:
> In some previous mail Tom Lane claimed that by SQL standard
> either an array of all NULLs or a record with all fields NULLs (I
> don't remember which) is also considered NULL. If this is true,
> then an empty array - which can be said to consist of nothing
> but NULLs - should itself be NULL.

What I think you're referring to is that the spec says that "foo IS
NULL" should return true if foo is a record containing only null fields.
That's a fairly narrow statement.  It does NOT say that NULL and
(NULL,NULL,...) are indistinguishable for all purposes; only that
this particular test doesn't distinguish them.  Also I don't think they
have the same statement for arrays.

The analogy to other aggregates is probably a better thing to argue
from.  On the other hand, I don't know anyone outside the SQL standards
committee who thinks it's actually a good idea that SUM() across no rows
returns null rather than zero.
        regards, tom lane



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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: WIP json generation enhancements: fk-tree-to-json()
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Removing PD_ALL_VISIBLE