Re: Temporary table in pl/pgsql - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Temporary table in pl/pgsql
Date
Msg-id b42b73150704131355l4470f9c9tf1e8d63d26a35a16@mail.gmail.com
Whole thread Raw
In response to Temporary table in pl/pgsql  (Raymond O'Donnell <rod@iol.ie>)
Responses Re: Temporary table in pl/pgsql  (Listmail <lists@peufeu.com>)
Re: Temporary table in pl/pgsql  (Raymond O'Donnell <rod@iol.ie>)
List pgsql-general
On 4/13/07, Raymond O'Donnell <rod@iol.ie> wrote:
> Hello again all,
>
> I'm using a temporary table in a pl/PgSQL function, and I've read the
> bit in the FAQ about using EXECUTE to force the table-creation query to
> be re-evaluated each time the function is called.
>
> However, it doesn't seem to work for me. The first time I call the
> function, all is well; the second (and every subsequent) time, the
> function bombs with the 'relation with OID XXXXX does not exist' error -
> this seems to imply that the EXECUTE statement is getting cached along
> with the rest of the function, which according to the docs ain't
> supposed to happen :-(

in addition to the 'create table' stmt, all queries that touch the
table must also be dynamic.  postgresql 8.3 will have improved plan
invalidation which will (aiui) remove this requirement.

merlin

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: meaning of Total runtime
Next
From: Listmail
Date:
Subject: Re: Temporary table in pl/pgsql