Martijn van Oosterhout <kleptog@svana.org> writes:
> Currently you can create temporary tables that are deleted at the end of the
> session. But how about temporary views? It's just a table with a rule so I
> don't imagine it would be terribly difficult. Are there any issues I havn't
> thought of?
> While we're at it, what about temporary functions?
AFAICS, anything created in the temp schema will get zapped at backend
shutdown. (It would be a good idea to rename RemoveTempRelations and
related functions in namespace.c if they are going to be used to zap
other sorts of objects, but they will work as-is.)
So this is doable with just a Small Matter of Programming to pass the
is-temp flag through from the grammar to wherever the object gets
created.
Whether it's worth the trouble is another question. What's the
use-case?
regards, tom lane