Re: array_length of an empty array

Поиск
Список
Период
Сортировка
От Ryan Kelly
Тема Re: array_length of an empty array
Дата
Msg-id 20120729135557.GA3145@llserver.lakeliving.com
обсуждение исходный текст
Ответ на array_length of an empty array  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On Sun, Jul 29, 2012 at 01:03:04AM -0700, John R Pierce wrote:
> 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.

It also seems to disagree with the standard:
> 1) An <empty specification> specifies a collection whose cardinality
> is zero.

-Ryan Kelly

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

Предыдущее
От: Vincent Veyron
Дата:
Сообщение: Re: BI tools and postgresql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: array_length of an empty array