summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/plancache.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-04-16 01:14:58 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-04-16 01:14:58 +0000
commit66888f7424f7d6c7cea2c26e181054d1455d4e7a (patch)
treed7224be67b7a912f5d65315afb1c121622373a0a /src/backend/utils/cache/plancache.c
parentfa92d21a486de868b21bbc03944649af3e1ac90f (diff)
Expose more cursor-related functionality in SPI: specifically, allow
access to the planner's cursor-related planning options, and provide new FETCH/MOVE routines that allow access to the full power of those commands. Small refactoring of planner(), pg_plan_query(), and pg_plan_queries() APIs to make it convenient to pass the planning options down from SPI. This is the core-code portion of Pavel Stehule's patch for scrollable cursor support in plpgsql; I'll review and apply the plpgsql changes separately.
Diffstat (limited to 'src/backend/utils/cache/plancache.c')
-rw-r--r--src/backend/utils/cache/plancache.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index 6165e59c6e6..28838eba09a 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -33,7 +33,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.6 2007/04/12 06:53:47 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.7 2007/04/16 01:14:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -458,10 +458,13 @@ RevalidateCachedPlan(CachedPlanSource *plansource, bool useResOwner)
if (plansource->fully_planned)
{
/*
- * Generate plans for queries. Assume snapshot is not set yet
+ * Generate plans for queries. We don't need any boundParams, and
+ * currently we don't need to worry about cursor options because
+ * cursor plans are never saved in the plancache (that might have
+ * to change someday). Also, assume snapshot is not set yet
* (XXX this may be wasteful, won't all callers have done that?)
*/
- slist = pg_plan_queries(slist, NULL, true);
+ slist = pg_plan_queries(slist, 0, NULL, true);
}
/*