Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 54376475864 for ; Tue, 23 Apr 2002 20:36:58 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g3O0agV08359; Tue, 23 Apr 2002 20:36:42 -0400 (EDT) From: Bruce Momjian Message-Id: <200204240036.g3O0agV08359@candle.pha.pa.us> Subject: Re: call the same pl/pgsql procedure twice in the same connection In-Reply-To: <200204231631.g3NGVjI02096@saturn.janwieck.net> To: Jan Wieck Date: Tue, 23 Apr 2002 20:36:42 -0400 (EDT) Cc: jack , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL97 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200204/283 X-Sequence-Number: 7547 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