spring a string to rows (Postgresql 8.4)

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: spring a string to rows (Postgresql 8.4)
Date: 2013-01-07 19:44:01
Message-ID: 50EB2581.6000707@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Is there a function to split a string to different rows?

For example, t1(id, col1)
values(1, 'a, b, c');

select id, string_split_to_row(col1, ',');

Return:
=========
1, a
1, b
1, c

Thanks alot!
Emi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2013-01-07 19:52:49 Re: spring a string to rows (Postgresql 8.4)
Previous Message Adrian Klaver 2013-01-07 16:18:42 Re: lc_time not working?