ERROR: function expression in FROM may not refer to other relations of same query level

Поиск
Список
Период
Сортировка
От Joseph S
Тема ERROR: function expression in FROM may not refer to other relations of same query level
Дата
Msg-id h33got$17dc$1@news.hub.org
обсуждение исходный текст
Ответы Re: ERROR: function expression in FROM may not refer to other relations of same query level  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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;


В списке pgsql-sql по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Moving text columns, when it actually is large
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: function expression in FROM may not refer to other relations of same query level