From: Joseph S <jks@selectacast.net>
To: pgsql-sql@postgresql.org
Subject: ERROR: function expression in FROM may not refer to other relations of same query level
Date: Wed, 08 Jul 2009 21:22:41 -0400
Message-ID: <h33got$17dc$1@news.hub.org> (raw)
I've seen this asked in the archives, but there was never any answer.
Supposed I have this table:
create temp table tempa (ids int[]);
insert into tempa SELECT ARRAY[1 , 2, 3];
Now how do I get output from that? None of these work: (xunnest is my
version of unnest since I'm using 8.2.x)
select * FROM xunnest(tempa.ids);
SELECT * FROM (select * FROM xunnest(tempa.ids) AS aa) AS ab, tempa;
SELECT * FROM ( select * FROM xunnest(ta.ids) AS aa) AS ab, tempa ta;
SELECT * FROM tempa ta, ( select * FROM xunnest(ta.ids) AS aa) AS ab;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jks@selectacast.net
Subject: Re: ERROR: function expression in FROM may not refer to other relations of same query level
In-Reply-To: <h33got$17dc$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox