Array extraction

Поиск
Список
Период
Сортировка
От veejar
Тема Array extraction
Дата
Msg-id a4c4d7e50703310405j52e24d24hf1294ca642f18bc3@mail.gmail.com
обсуждение исходный текст
Ответы Re: Array extraction
Список pgsql-general
Hi!

I have such table:

user_group
---------------------------------
ug_id -> serial primary key
ug_users -> int4[]

For example table has such rows:
 ug_id | ug_users

-------+--------------
1 | { 2,5,6 }
2 | { 3,4,9 }
I want to write SQL-query or write user defined function to get such result (extract array values):
 ug_id | ug_users
-------+--------------
1 | 2
1 | 5
1 | 6
2 | 3
2 | 4
2 | 9

Help please to solve this problem.
--
Vadim

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

Предыдущее
От: "Mikko Partio"
Дата:
Сообщение: Re: Anyone know where I can get an 8.2.3 binary for ubuntu?
Следующее
От: Csaba Kalman
Дата:
Сообщение: Re: PANIC: unexpected hash relation size