Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 57F3D9FBADA for ; Wed, 21 Feb 2007 17:35:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 81128-01 for ; Wed, 21 Feb 2007 17:34:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 61F919FBAE4 for ; Wed, 21 Feb 2007 17:34:58 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HJzKd-000634-QA for pgsql-sql@postgresql.org; Wed, 21 Feb 2007 16:48:59 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id B75B54051; Wed, 21 Feb 2007 16:34:51 -0500 (EST) Date: Wed, 21 Feb 2007 16:34:51 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Problems with temp table and PL Message-ID: <20070221213451.GA15503@phlogiston.dyndns.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.191 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200702/216 X-Sequence-Number: 27550 On Wed, Feb 21, 2007 at 06:17:50PM -0300, Martin Marques wrote: > My problem is that if I execute the same function again (in the same > session) I get an error when trying to insert data into it (looks like the > session has an old reference of the table): You have to use EXECUTE for this. See the docs. A -- Andrew Sullivan | ajs@crankycanuck.ca I remember when computers were frustrating because they *did* exactly what you told them to. That actually seems sort of quaint now. --J.D. Baldwin