Re: Inconsistent behavior on Array & Is Null?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Inconsistent behavior on Array & Is Null?
Дата
Msg-id 200404011712.23382.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Inconsistent behavior on Array & Is Null?  (Joe Conway <mail@joeconway.com>)
Ответы Re: Inconsistent behavior on Array & Is Null?  (Joe Conway <mail@joeconway.com>)
Re: Inconsistent behavior on Array & Is Null?  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Joe,

> This is correct. There are no dimensions to an empty array by 
> definition. The only other way to handle this would be an ERROR. I 
> followed the lead of (the pre-existing function) array_dims() when 
> creating array_upper() and array_lower().

What about a 0?    That seems more consistent to me.   If the array is empty, 
its dimensions are not "NULL", meaning "unknown", but in fact zero elements, 
which is a known value.  The way it works now, array_upper on a NULL array 
produces the same results as array_upper on an empty-but-non-null array.

Or is there some concept I'm missing?

-- 
-Josh BerkusAglio Database SolutionsSan Francisco



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

Предыдущее
От: "J. Andrew Rogers"
Дата:
Сообщение: PITR for replication?
Следующее
От: Gavin Sherry
Дата:
Сообщение: Re: PITR for replication?