postgres=# create temp table foo(a int); CREATE TABLE postgres=# do $$ begin insert into foo values(10); end $$; -- plpgsql DO postgres=# select * from foo; a ---- 10 (1 row)
PL/PgSQL doesn't know the pg_temp meta schema in case you need to really work on that TEMP TABLE. At the moment I had to move those DDL/DML queries within a "plain" SQL function.
Is this a feature or a bug? (Seriously, I mean! :-)
TIA.
-- Vincenzo Romano - NotOrAnd.IT Information Technologies -- NON QVIETIS MARIBVS NAVTA PERITVS