X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B87C552849 for ; Mon, 20 Jun 2005 13:04:03 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78813-09 for ; Mon, 20 Jun 2005 16:03:54 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id ABEAB52839 for ; Mon, 20 Jun 2005 13:03:52 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 20 Jun 2005 11:03:49 -0500 Subject: Re: Temporary Tables From: Scott Marlowe To: Anjan Dave Cc: pgsql-admin@postgresql.org In-Reply-To: <4BAFBB6B9CC46F41B2AD7D9F4BBAF78502EA14CB@vt-pe2550-001.vantage.vantage.com> References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF78502EA14CB@vt-pe2550-001.vantage.vantage.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1119283429.3382.114.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 20 Jun 2005 11:03:49 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/154 X-Sequence-Number: 17909 On Mon, 2005-06-20 at 10:20, Anjan Dave wrote: > Hi, > > > > A developer is trying to use a Temporary Table via the java based > application. The problem is following the temp table creation, he > wants subsequent queries to query the temp table, but they are not in > the same database session as the temp table. Is this something I can > setup somewhere in the config? I would appreciate any pointers/info I > can forward to him. His usage suggests he should be using a regular table, possibly with some kind of clean up / setup user defined functions associated with it. The whole idea of temporary tables is that they allow you to write a single client that declares a single table by name, and then you can run that client any number of times, and each will not interfere with the other. Generally, trying to share temp tables across different backends is a bad idea, since the original session that created it might exit and it would cease to be.