Re: spring a string to rows (Postgresql 8.4) - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: spring a string to rows (Postgresql 8.4)
Date
Msg-id kcf957$jpd$1@ger.gmane.org
Whole thread Raw
In response to spring a string to rows (Postgresql 8.4)  (Emi Lu <emilu@encs.concordia.ca>)
List pgsql-general
Emi Lu wrote on 07.01.2013 20:44:
> 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
>
>
>
>

select id, regexp_split_to_table(col1, ',')
from t1;

pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: spring a string to rows (Postgresql 8.4)
Next
From: Moshe Jacobson
Date:
Subject: Re: spring a string to rows (Postgresql 8.4)