Mike Mascari <mascarm@mascari.com> writes:
> Forgive me if I'm wrong Bruce, but I thought the LOCAL option
> was WRT session visbility, not lifetime. IOW, all TEMP tables
> exist until dropped or until the end of session, not
> transaction. And LOCAL vs. GLOBAL determines visibility in other
> sessions.
Postgres doesn't implement the LOCAL/GLOBAL distinction; in fact,
when you get right down to it, our temporary tables have almost no
visible correlation to the SQL spec's notion of temporary tables.
Our temp tables are per-session. SQL defines temp tables with
respect to concepts like modules, which we ain't got.
regards, tom lane