Re: query first time works second time fails for one connection

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: query first time works second time fails for one connection
Дата
Msg-id 10152.996683280@sss.pgh.pa.us
обсуждение исходный текст
Ответ на query first time works second time fails for one connection  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
Temp tables don't interact well with plpgsql's attempts to cache query
plans for the queries in its functions.  This is a bug, but a solution
is not close at hand.

In 7.1, you can work around this by using EXECUTE to execute the queries
on the temp table, thus forcing a re-plan on every execution.  Ugly but
serviceable.

Another possibility is to create the temp table only once per session,
outside the function itself.  The function can just DELETE FROM the
table to clear it for re-use on each call.

            regards, tom lane

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

Предыдущее
От: rychu@sky.pl
Дата:
Сообщение: Odpowied¼ automatyczna
Следующее
От: Darin Fisher
Дата:
Сообщение: Too many open files