> This is a well-known problem: plpgsql caches a query plan that refers
> to the first version of the temp table, and it doesn't know it needs
> to rebuild the plan. AFAIK the only workaround at present is to use
> EXECUTE for queries referencing the temp table.
But EXECUTE does not support select into, does it?
--
Tatsuo Ishii