Re: BUG #8226: Inconsistent unnesting of arrays - Mailing list pgsql-bugs

From Greg Stark
Subject Re: BUG #8226: Inconsistent unnesting of arrays
Date
Msg-id CAM-w4HNZ-6X9eAwtCY72Gff3ihOpUF-L2x2+3Wt7=+A7aaJ5+A@mail.gmail.com
Whole thread Raw
In response to BUG #8226: Inconsistent unnesting of arrays  (ddebernardy@yahoo.com)
Responses Re: BUG #8226: Inconsistent unnesting of arrays
List pgsql-bugs
On Wed, Jun 12, 2013 at 9:58 AM,  <ddebernardy@yahoo.com> wrote:
> denis=# select 1 as a, unnest('{2,3}'::int[]) as b, unnest('{4,5}'::int[])

set returning functions in the target list of the select don't behave
the way you're thinking. What you probably want to do is move the
unnest() to the FROM clause:

select 1 as a, b, c from unnest('{2,3}'::int[]) as b(b),
unnest('{4,5}'::int[]) as c(c)


--
greg

pgsql-bugs by date:

Previous
From: ddebernardy@yahoo.com
Date:
Subject: BUG #8226: Inconsistent unnesting of arrays
Next
From: Greg Stark
Date:
Subject: Re: BUG #8226: Inconsistent unnesting of arrays