change array dimension

Поиск
Список
Период
Сортировка
От Gerhard Heift
Тема change array dimension
Дата
Msg-id 20100701233203.GC1914@gheift.kawo1.RWTH-Aachen.DE
обсуждение исходный текст
Ответы Re: change array dimension  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Hello,

is it possible to change the dimension of an array? I am looking for something
like this:

SELECT change_array_dims('[1:2][1:2]', '{1,2,3,4}'::int[]);
 change_array_dims
-------------------
 {{1,2},{3,4}}

and the other way around:

SELECT change_array_dims('[1:4]', '{{1,2},{3,4}}'::int[]);
 change_array_dims
-------------------
 {1,2,3,4}

Does such a function exist?

Thanks,
  Gerhard

Вложения

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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: different language indexes
Следующее
От: Stephen Denne
Дата:
Сообщение: Help with pgAndroid Contest