Converting each item in array to a query result row

From: Postgres User <postgres(dot)developer(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Converting each item in array to a query result row
Date: 2009-05-29 07:21:11
Message-ID: b88c3460905290021o6870bb46tec88ced0c40643d9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'd writing a query against a function (pg_proc) that contains 2
fields of an array type. Ideally, I'd like to select 1 row from the
table, but return a query row for each item in the array.

For example, if one row contains the array {"a", "b", "c"}
I'd like the query to return 3 rows, one for each of these elements.

Any idea if this is possible?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message artacus 2009-05-29 08:52:32 Re: Converting each item in array to a query result row
Previous Message Scott Marlowe 2009-05-29 05:39:57 Re: What is the right way to deal with a table with rows that are not in a random order?