Re: When is a record NULL?

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: When is a record NULL?
Дата
Msg-id 37ed240d0907232134g7cdd4139l19a79d81f8c98666@mail.gmail.com
обсуждение исходный текст
Ответ на Re: When is a record NULL?  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: When is a record NULL?  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
2009/7/24 David E. Wheeler <david@kineticode.com>:
> ROW(1, NULL) is neither NULL nor NOT NULL. I've no idea what state it is,
> but I guess that's the standard.

Well, a ROW is an ordered set of values, each one of which may be
either NULL or NOT NULL.

It doesn't really make sense to talk about the ROW itself being NULL
or NOT NULL, only its member values (but for extra confusion, contrast
with the treatment of arrays, which can themselves be NULL).

It does make sense, however, to talk about the ROW's member values
being entirely NULL or entirely NOT NULL, and that's what the IS NULL
and IS NOT NULL tests tell you about.

I guess the spec authors figured they might as well make IS [NOT] NULL
do something useful when applied to a row rather than throwing an
error.  I tend to agree.

I hope that provides some clarity.

Cheers,
BJ


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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: Determining client_encoding from client locale
Следующее
От: Ms swati chande
Дата:
Сообщение: GeQo Pool Size and plan worth