mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Make use of plancache module for SPI plans. In particular, since plpgsql
uses SPI plans, this finally fixes the ancient gotcha that you can't drop and recreate a temp table used by a plpgsql function. Along the way, clean up SPI's API a little bit by declaring SPI plan pointers as "SPIPlanPtr" instead of "void *". This is cosmetic but helps to forestall simple programming mistakes. (I have changed some but not all of the callers to match; there are still some "void *"'s in contrib and the PL's. This is intentional so that we can see if anyone's compiler complains about it.)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/plancache.h,v 1.1 2007/03/13 00:33:43 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/plancache.h,v 1.2 2007/03/15 23:12:07 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -101,5 +101,6 @@ extern void DropCachedPlan(CachedPlanSource *plansource);
|
||||
extern CachedPlan *RevalidateCachedPlan(CachedPlanSource *plansource,
|
||||
bool useResOwner);
|
||||
extern void ReleaseCachedPlan(CachedPlan *plan, bool useResOwner);
|
||||
extern TupleDesc PlanCacheComputeResultDesc(List *stmt_list);
|
||||
|
||||
#endif /* PLANCACHE_H */
|
||||
|
||||
Reference in New Issue
Block a user