X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8531AD1B1C8 for ; Thu, 22 Jul 2004 14:27:13 -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 55164-04 for ; Thu, 22 Jul 2004 17:27:05 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 15465D1B199 for ; Thu, 22 Jul 2004 14:27:00 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id AF5CB35647; Thu, 22 Jul 2004 10:27:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id AD6E735563; Thu, 22 Jul 2004 10:27:00 -0700 (PDT) Date: Thu, 22 Jul 2004 10:27:00 -0700 (PDT) From: Stephan Szabo To: Gerardo Castillo Cc: pgsql-sql@postgresql.org Subject: Re: Problem with transaction in functions and tempory tables In-Reply-To: <0I19005KZIKF3S@ice.co.cr> Message-ID: <20040722102557.V4811@megazone.bigpanda.com> References: <0I19005KZIKF3S@ice.co.cr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/186 X-Sequence-Number: 18438 On Thu, 22 Jul 2004, Gerardo Castillo wrote: > Hello, > > I'm using PostgreSQL 7.4 > > I have a function wich use temporary tables. I read about temporary tables > and they exists during the session. > But i have to call this function many times in the same sesion with > diferents parameters and expecting different results. So, there is a problem > because the temporary table already exists during the second execution of > the funcition. If you're going to use temporary tables in a plpgsql function, you really need to use the table only through EXECUTE commands so that the plans don't get saved.