Re: How to split an array into columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to split an array into columns
Дата
Msg-id 25445.1535118064@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to split an array into columns  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> Maybe I am missing something, but: 
>    select id, data[1], data[2]
>    from the_table;
> will work just fine. 

If the arrays are of varying length, unnest() might be what the OP
is looking for.

            regards, tom lane


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

Предыдущее
От: Abhinav Mehta
Дата:
Сообщение: Re: PG-Sample | Error | Equality operator for type json
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Hungarian collation in English Windows server