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

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

Uh, you didn't actually say what output you're looking for, but
I'm going to guess it's this:

regression=# select unnest(ids) from tempa;unnest 
--------     1     2     3
(3 rows)

Pre-8.4, you need a version of unnest() that's coded in C or SQL;
plpgsql won't do.
        regards, tom lane


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

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