Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
Date
Msg-id 17505.1183326406@sss.pgh.pa.us
Whole thread Raw
In response to what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
List pgsql-hackers
"Pavel Stehule" <pavel.stehule@gmail.com> writes:
> if I understand well, there isn't any difference between local and
> global temp tables in postgresql.

See the archives; some time ago we determined that the correct reading
of the spec is that global/local determines visibility of temp tables
across modules, but still within a single session.  Since we don't have
modules there is no difference for us.

> I have question. Is correct implementation of global temp in Oracle or
> Firebird, where content of glob.temp table is session visible and
> metadata of g.t.t is persistent?

It's correct per spec.  Whether it's more useful than what we do is
highly debatable --- it forces all sessions to use the same definition
of any given temp table name, which is a bit silly for something that's
supposed to support session-local data.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Restartable signals 'n all that
Next
From: Naz Gassiep
Date:
Subject: Re: todo: Hash index creation