Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 0B0229FB1F2 for ; Mon, 2 Jul 2007 22:59:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 39516-01 for ; Mon, 2 Jul 2007 22:59:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from oxford.xeocode.com (unknown [87.127.95.194]) by postgresql.org (Postfix) with ESMTP id 764CC9FB266 for ; Mon, 2 Jul 2007 22:59:52 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1I5Xg7-0001Lo-Ii; Tue, 03 Jul 2007 02:59:43 +0100 From: Gregory Stark To: "Jaime Casanova" Cc: "Alvaro Herrera" , "Tom Lane" , "Jim Nasby" , "Pavel Stehule" , "PostgreSQL-development" Subject: Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL In-Reply-To: (Jaime Casanova's message of "Tue, 3 Jul 2007 01:46:06 +0000") Organization: EnterpriseDB References: <162867790707011431u71e53543x19e64e5bb160b124@mail.gmail.com> <17505.1183326406@sss.pgh.pa.us> <19689F96-2FE1-4343-BE86-94317AEB0C57@decibel.org> <19728.1183394601@sss.pgh.pa.us> <20070703004634.GB4757@alvh.no-ip.org> X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.hackers" 11042) Date: Tue, 03 Jul 2007 02:59:43 +0100 Message-ID: <87d4za5jsg.fsf@oxford.xeocode.com> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/48 X-Sequence-Number: 104963 "Jaime Casanova" 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