Re: ARRAY() returning NULL instead of ARRAY[] resp. {}

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Дата
Msg-id 42923762.7010708@joeconway.com
обсуждение исходный текст
Ответ на ARRAY() returning NULL instead of ARRAY[] resp. {}  (Markus Bertheau <twanger@bluetwanger.de>)
Ответы Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Список pgsql-sql
Markus Bertheau wrote:
> why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of
> ARRAY[] resp. '{}'?
> 

Why would you expect an empty array instead of a NULL? NULL is what 
you'd get for other data types -- for example:

regression=# SELECT (SELECT 1 WHERE FALSE) IS NULL; ?column?
---------- t
(1 row)

Joe


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

Предыдущее
От: Markus Bertheau
Дата:
Сообщение: Re: ARRAY() returning NULL instead of ARRAY[] resp. {}
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ARRAY() returning NULL instead of ARRAY[] resp. {}