X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 685B1D1E121 for ; Thu, 22 Apr 2004 23:16:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 14560-09 for ; Thu, 22 Apr 2004 23:16:09 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3358DD1E144 for ; Thu, 22 Apr 2004 23:16:05 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3N2G18M014588; Thu, 22 Apr 2004 22:16:01 -0400 (EDT) To: Bruce Momjian Cc: Dennis , postgres SQL Subject: Re: lifetime of temp schema versus compiled image of plpgsql proc In-reply-to: <200404222354.i3MNsgF26021@candle.pha.pa.us> References: <200404222354.i3MNsgF26021@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Thu, 22 Apr 2004 19:54:42 -0400" Date: Thu, 22 Apr 2004 22:16:01 -0400 Message-ID: <14587.1082686561@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/245 X-Sequence-Number: 17620 Bruce Momjian writes: > Dennis wrote: >> So I should be using EXECUTE for all access to the temp tables? ie inserts, >> and selects (in this case). Should I use execute for the table creation? > All access from plpgsql functions for temp tables should use EXECUTE, I think that advice is not correct nor relevant to Dennis' problem. You need EXECUTE if you are dropping and recreating temp tables within the lifetime of a single connection, but he didn't do that. Even if he did do it and hasn't told us so, that does not explain why the error message complains about the temp *schema* and not a temp table. There's something very strange here, because the temp schema name for a given session is definitely fixed for the life of the session. regards, tom lane