Skip site navigation (1) Skip section navigation (2)

Re: Problem with transaction in functions and tempory tables

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Gerardo Castillo <gcastillo(at)ice(dot)co(dot)cr>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem with transaction in functions and tempory tables
Date: 2004-07-22 17:27:00
Message-ID: 20040722102557.V4811@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
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.

In response to

pgsql-sql by date

Next:From: Joe ConwayDate: 2004-07-22 18:22:47
Subject: Re: Converting a plperlu function to a plpgsql function
Previous:From: Tom LaneDate: 2004-07-22 17:10:38
Subject: Re: LIKE on index not working

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group