Re: Bug #913: plpgsql function fails on second call

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Bug #913: plpgsql function fails on second call
Дата
Msg-id 20030318102844.U40313-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Bug #913: plpgsql function fails on second call  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
On Tue, 18 Mar 2003 pgsql-bugs@postgresql.org wrote:

>         create temp table ab as
>         select a.value as a_value, b.value as b_value
>         from a left outer join b
>         on a.id = b.id;
>
>         for row in select * from ab loop
>                 return next row;
>         end loop;
>
>         drop table ab;

If you're going to be doing create/drop table, you need to use
EXECUTE on the queries relating to the table, otherwise it'll cache
the plan which is invalid on the second pass since the table being
referenced is gone (replaced by a new ab table).

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug #913: plpgsql function fails on second call
Следующее
От: Sean Reifschneider
Дата:
Сообщение: Re: Problem with RULE to update tables