Tom Lane writes:
> I should think there would be a notable performance advantage, since
> one need not create a temp table (which in our current implementation is
> just as expensive as creating a permanent table); not to mention
> dropping the temp table later, vacuuming up the resulting dead rows in
> pg_class and pg_attribute, etc. Whether that advantage is great enough
> to justify a nonstandard feature is unproven, but I imagine Mike could
> answer it with a little experimentation.
We could support that if we implemented temporary tables with the standard
SQL semantics, namely that the table structure persists but the data is
deleted at the end of the session. That would also help in some other
scenarios, such as creating functions that reference temporary tables.
--
Peter Eisentraut peter_e@gmx.net