generic way to retrieve array as rowset

From: SunWuKung <Balazs(dot)Klein(at)axelero(dot)hu>
To: pgsql-general(at)postgresql(dot)org
Subject: generic way to retrieve array as rowset
Date: 2006-01-03 11:37:51
Message-ID: MPG.1e248068a70a8302989682@news.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When storing data in an array, like this

id array
1, {1,2}
2, {10,20}
3, {100,200}

is there a generic way to retrieve them as arowset, like this

id array_dimension1
1 1
1 2
2 10
2 20

By writing something like this:

Select id, explode(array) From foo Where id<3

(I know - store it as a table instead of an array, but beside that.)

Thanks.
Balázs

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-01-03 12:02:23 Re: generic way to retrieve array as rowset
Previous Message xiapw 2006-01-03 11:01:24 who has some document about extending postgresql