Search Postgresql Archives

Re: Issues with PL/PGSQL function..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Shoaib Mir" <shoaibmir@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux