Re: Converting each item in array to a query result row - Mailing list pgsql-general

From Tom Lane
Subject Re: Converting each item in array to a query result row
Date
Msg-id 17210.1243608297@sss.pgh.pa.us
Whole thread Raw
In response to Re: Converting each item in array to a query result row  (Adam Ruth <adamruth@mac.com>)
Responses Re: Converting each item in array to a query result row
List pgsql-general
Adam Ruth <adamruth@mac.com> writes:
> I needed to do this just the other day, here's what I did:

> create or replace function explode(_a anyarray) returns setof
> anyelement as $$

You'd be well advised to call this unnest(), because that's what the
equivalent built-in function in 8.4 is called ;-)

            regards, tom lane

pgsql-general by date:

Previous
From: Osvaldo Kussama
Date:
Subject: Re: Converting each item in array to a query result row
Next
From: Alvaro Herrera
Date:
Subject: Re: I can't drop a user if I don't drop his grants beforehand??????????????????