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,
Pennsylvania19026