Re: plpgsql temporary table problem

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Geoff Russell <geoff(at)austrics(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org
Subject: Re: plpgsql temporary table problem
Date: 2002-04-14 17:15:44
Message-ID: 200204141715.g3EHFiF12878@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > ... I believe every reference to the TEMP table has
> > to be an EXECUTE. I think this will be fixed in 7.3 because the temp
> > tables will exist in a separate schema.
>
> No, the separate schema won't help matters a bit.
>
> Plan dependency tracking (to allow us to drop invalidated cached plans)
> would help.

Oh, the old temp code mapped a temp name to a system table name that was
stored in the plpgsql function cache. I thought the new code would not
make that mapping until function runtime. Does the function cache keep
a physical table name in the cache with schemas, or maybe does it store
the oid of the table? It probably is oid, and that's why the schema
changes will not fix it.

I have update our TODO item to explain the solution:

o Fix problems with complex temporary table creation/destruction
without using PL/PgSQL EXECUTE, needs cached plan invalidation

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-04-14 17:36:26 Re: plpgsql temporary table problem
Previous Message Tom Lane 2002-04-14 16:58:05 Re: plpgsql temporary table problem