Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A426A9FB4F7 for ; Sun, 11 Feb 2007 13:41:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 19891-04 for ; Sun, 11 Feb 2007 13:41:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A0E0F9FB2FE for ; Sun, 11 Feb 2007 13:41:27 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l1BHfGeO001941; Sun, 11 Feb 2007 12:41:16 -0500 (EST) To: "Robert Wimmer" cc: pgsql-interfaces@postgresql.org Subject: Re: temporary table / recursion In-reply-to: References: Comments: In-reply-to "Robert Wimmer" message dated "Sun, 11 Feb 2007 09:19:58 +0000" Date: Sun, 11 Feb 2007 12:41:16 -0500 Message-ID: <1940.1171215676@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.156 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/11 X-Sequence-Number: 6431 "Robert Wimmer" writes: > i cannot drop a temporary table that was created in a plpgsql function. It was created with "on commit drop". Are you sure it still exists? The problem looks to me like the well-known issue that plpgsql caches plans, and so you can't have it refer to different temp tables on successive executions (in the same session) unless you use EXECUTE. regards, tom lane