Re: Single-argument variant for array_length and friends?

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: Single-argument variant for array_length and friends?
Дата
Msg-id CADxJZo05oNBr6ifEco9jCrWmhVsDX7G1TnQtvwLpasWnx3AJGg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Single-argument variant for array_length and friends?  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Single-argument variant for array_length and friends?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 21 March 2013 17:32, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> If I though about it more, I like to more limit one parametric
> array_length function just for only 1D array. So it is your A use
> case. But I understand so this variant is not orthogonal. Hard to say,
> what is better.
>

Yes, for me (a) is running a very close 2nd place to (c).  The
strength of (a) is it means we aren't making guesses about the user's
intention.  When a user concocts an expression that is ambiguous, I
feel it is usually good to kick it back to them and ask them to be
more precise.

On the other hand, I find it very natural to interpret "what is the
length of my multidim array" to mean "what is the length of the
outermost dimension of my multidim array", because to me a multidim
array is just an array that contains more arrays.

Cheers,
BJ



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Single-argument variant for array_length and friends?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Single-argument variant for array_length and friends?