comma separated value splitting

Поиск
Список
Период
Сортировка
От Martin Atukunda
Тема comma separated value splitting
Дата
Msg-id 200404221603.05200.matlads@dsmagic.com
обсуждение исходный текст
Ответы Re: comma separated value splitting  (Joe Conway <mail@joeconway.com>)
Список pgsql-novice
due to situations beyond my control i have a field that holds comma separated
email addresses.

create table filters (name varchar(64), filter text);
insert into filters values ('test', 'test1@test.com, test2@test.com,
test3@test.com');

filter is the field that holds the email addresses.


how do i make postgres split for me the email addresses and return me a table
so that for 'test' I get:

name | email
---------------------
test | test1@test.com
test | test2@test.com
test | test3@test.com

any help appreciated

- Martin -

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

Предыдущее
От: Christian Armeanu
Дата:
Сообщение: Re: Using SELECT WHERE
Следующее
От: Jeff Deroshia
Дата:
Сообщение: postmaster does not shut down