unnest on multi-dimensional arrays

Поиск
Список
Период
Сортировка
От Zev Benjamin
Тема unnest on multi-dimensional arrays
Дата
Msg-id 5296EB60.2010103@strangersgate.com
обсуждение исходный текст
Ответы Re: unnest on multi-dimensional arrays  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: unnest on multi-dimensional arrays  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
It appears that unnest, when called on a multi-dimensional array,
effectively flattens the array first.  For example:

=> select * from unnest(array[array[1, 2], array[2, 3]]);
  unnest
--------
       1
       2
       2
       3
(4 rows)

while I would have expect something like the following:

=> select * from unnest(array[array[1, 2], array[2, 3]]);
  unnest
--------
    {1, 2}
    {2, 3}
(2 rows)

Is there any way to get the latter behavior?


Zev


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

Предыдущее
От: Albert Chern
Дата:
Сообщение: Prefix search on all hstore values
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: unnest on multi-dimensional arrays