From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Jan Wieck <janwieck@yahoo.com>
Cc: jack <datactrl@tpg.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: call the same pl/pgsql procedure twice in the same connection
Date: Tue, 23 Apr 2002 20:36:42 -0400 (EDT)
Message-ID: <200204240036.g3O0agV08359@candle.pha.pa.us> (raw)
In-Reply-To: <200204231631.g3NGVjI02096@saturn.janwieck.net>
Jan Wieck wrote:
> you are really good at making things sound simple by stopping
> half way through.
Sure. How do you think I got so far. :-)
> Your assumption is exactly my "detect if a plan uses
> temporary objects". No go on, what exactly are you doing with
> the information that the plan uses a temp table?
If it uses a temp table, run the plan and discard it, don't save the
plan in the cache.
> And BTW, since you are the one who invented temp tables, how
> does someone detect a temp table?
You have to call a macro on the relnames used in the plan. Before
schemas, it was just a macro. Now that Tom has them in schemas, I am
not sure how to detect them, but I assume they are in a separate schema.
Looks like he created FindTempRelations() that returns a list of temp
relations.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pgman@candle.pha.pa.us, janwieck@yahoo.com, datactrl@tpg.com.au
Subject: Re: call the same pl/pgsql procedure twice in the same connection
In-Reply-To: <200204240036.g3O0agV08359@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox