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

From Gregory Stark
Subject Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
Date
Msg-id 87d4za5jsg.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL  ("Jaime Casanova" <systemguards@gmail.com>)
Responses Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List pgsql-hackers
"Jaime Casanova" <systemguards@gmail.com> writes:

> while not just a new rekind indicating this is a template and not and
> actual table. and using that template for creating the actual tables?

For precisely the reason stated upthread. That would mean creating and
deleting catalog entries for every transaction. Imagine a busy OLTP system
running hundreds of transactions per second trying to use a temporary table
for intermediate results. Mixing DDL and DML is just as bad an idea behind the
scenes as it is for users.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL