Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Дата
Msg-id CADxJZo2RO_8tv5C4t6xU-K8VMcroEgJXAeoucm5tbJoza1Qr=A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
On 28 March 2013 00:21, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> The patch is also allowing '{{},{},{}}' which is described up-thread
> as a 2-D empty array. That's pretty misleading, since it has length 3
> (in the first dimension). '{{},{}}' and '{{}}' are both "more empty",
> but neither is completely empty.

> I'm not saying that the current situation is not broken. I'm just
> questioning whether the fix is actually any less confusing than what
> we have now.

Well the fix is primarily about 1-D empty arrays, and in that respect
it is much less confusing than what we have now.  As for multidim
arrays, I don't use them in the field, so I don't have a strong
opinion about how (or even whether) we should support empty multidim.
I included the '{{}}' syntax following comments from Tom that we
should consider supporting that if we were to get rid of zero-D, but I
don't really have any skin in that game.

Since we require multidim arrays to be regular, perhaps they would
need extents in all dimensions to be practically useful ... if you
wanted to define a blank tic-tac-toe board using a 2-D array, for
example, you'd probably define it as 3x3 with NULL values in each
position, rather than trying to make it "empty".

Cheers,
BJ



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: money with 4 digits after dot
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Allow external recovery_config_directory