output array elements in rows

From: Rainer(dot)Zaiss(at)bondy(dot)ird(dot)fr
To: pgsql-general(at)postgresql(dot)org
Subject: output array elements in rows
Date: 2008-05-03 19:19:44
Message-ID: 1209842384.481cbad06fb9f@webmail.bondy.ird.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Dear list,

I'm looking for a function to output the elements of my array column in
rows ? Let's say I have following table:

id = integer
nam= array char varying

id nam
1 {"nam1","nam2","nam3"}
2 {"n1","n2"}

I think there should be available a function to expand the elements of an
array of caractères into a set of rows ?

id nam
1 nam1
1 nam2
1 nam3
2 n1
2 n2

THANK YOU VERY MUCH FOR YOUR HELP

Browse pgsql-general by date

  From Date Subject
Next Message Oscar Uribe 2008-05-03 19:35:41 Sequences
Previous Message Craig Ringer 2008-05-03 19:04:56 Re: clustering without locking