Re: Issues with PL/PGSQL function..

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Issues with PL/PGSQL function..
Дата
Msg-id 29203.1184636633@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Issues with PL/PGSQL function..  ("Shoaib Mir" <shoaibmir@gmail.com>)
Список pgsql-general
"Shoaib Mir" <shoaibmir@gmail.com> writes:
> Try using it with 'execute' as that might help...

In current releases you need EXECUTE, else the thing will try to cache a
query plan using the OID of the first instance of the temp table, and
that won't work for subsequent instances.

> OR:
> CREATE TEMP TABLE tblname WITH (OIDS) ON COMMIT DROP AS select * from
> someothertbl;

ON COMMIT DROP won't help, but maybe you could have just one temp table
per session, created with ON COMMIT DELETE ROWS?  Or try TRUNCATE'ing
the table when it already exists.

This will be all better in 8.3, FWIW.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: why postgresql over other RDBMS
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: why postgresql over other RDBMS