comma separated value splitting

From: Martin Atukunda <matlads(at)dsmagic(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: comma separated value splitting
Date: 2004-04-22 13:03:05
Message-ID: 200404221603.05200.matlads@dsmagic.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)test(dot)com, test2(at)test(dot)com,
test3(at)test(dot)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(at)test(dot)com
test | test2(at)test(dot)com
test | test3(at)test(dot)com

any help appreciated

- Martin -

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message George Weaver 2004-04-22 14:29:44 How do I trigger the re-creation of a crosstab-type view
Previous Message Tom Lane 2004-04-21 19:14:12 Re: vacuum full question.