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

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp.
Дата
Msg-id 42A472A4.6090505@joeconway.com
обсуждение исходный текст
Ответ на Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}  (Joe Conway <mail@joeconway.com>)
Ответы Re: [SQL] ARRAY() returning NULL instead of ARRAY[]
Список pgsql-hackers
Joe Conway wrote:
> Actually, consistent with my last post, I think array_upper() on a 
> zero-element array should return NULL. A zero-element array has a 
> defined lower bound, but its upper bound is not zero -- it is really 
> undefined.

Just to clarify my response, this is what I propose:

regression=# select array_upper('[2][1:]={{},{}}'::int[],1); array_upper
-------------           2
(1 row)

regression=# select array_upper('[2][1:]={{},{}}'::int[],2) IS NULL; ?column?
---------- t
(1 row)


Joe


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: PGDN source browser