Re: array_length of an empty array

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: array_length of an empty array
Дата
Msg-id 21633.1343574601@sss.pgh.pa.us
обсуждение исходный текст
Ответ на array_length of an empty array  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
John R Pierce <pierce@hogranch.com> writes:
> hmmm.    array[]::integer[]    is an empty array, {}, eg an array with
> zero elements

> but array_length(array[]::integer[])   is NULL rather than zero.    this
> seems counterintuitive.

IIRC, there are a whole bunch of questionable behaviors around empty
arrays.  Somebody should go through the whole list of array-related
functions and come up with a coherent proposal for fixing all of them.

            regards, tom lane

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

Предыдущее
От: Ryan Kelly
Дата:
Сообщение: Re: array_length of an empty array
Следующее
От: Edson Richter
Дата:
Сообщение: Re: Enums documentation "glitch"