Re: Multidimensional array definition in composite type appears parsed as string -- SOLVED

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Multidimensional array definition in composite type appears parsed as string -- SOLVED
Дата
Msg-id 12327.1243530177@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Multidimensional array definition in composite type appears parsed as string -- SOLVED  (miller_2555 <nabble.30.miller_2555@spamgourmet.com>)
Список pgsql-general
miller_2555 <nabble.30.miller_2555@spamgourmet.com> writes:
> I had assumed that the whole slice of a sub-array would have been returned
> as a 1-D array by accessing an element of the "outer" array, but that does
> not appear the case.

No, it's not.  The semantics are constrained here by the fact that we
don't consider 1-D and 2-D arrays (or any-D arrays) to be distinct
types.  So the parser determines whether the result of a subscript
expression has the element type or the (same) array type based on
whether or not there's a [subscript:subscript] anywhere, not on
how many subscripts there are.

There's been some discussion of tightening things up to throw an
error rather than just returning NULL if an inappropriate number of
subscripts are given, but so far nothing's been done about it.

            regards, tom lane

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

Предыдущее
От: "Tim Bruce - Postgres"
Дата:
Сообщение: Re: How to speed up the first-time-searching in pgsql?
Следующее
От: "Anirban Pal"
Дата:
Сообщение: Re: Postgres registry access using java