git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1d5cc3)
Teach planstate_tree_walker about custom scans.
2015年9月23日 01:42:00 +0000 (21:42 -0400)
2015年9月23日 01:42:00 +0000 (21:42 -0400)
This logic was missing from ExplainPreScanNode, from which I derived
planstate_tree_walker. But it shouldn't be missing, especially not
from a generic walker function, so add it.

KaiGai Kohei


diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c
index 4a2447409a9e7c84678e14746c65fdf45eedd036..a11cb9ff4d10fe657800299711301f93b7c60bf9 100644 (file)
--- a/src/backend/nodes/nodeFuncs.c
+++ b/src/backend/nodes/nodeFuncs.c
@@ -3428,6 +3428,7 @@ bool
planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
{
Plan *plan = planstate->plan;
+ ListCell *lc;
/* initPlan-s */
if (planstate_walk_subplans(planstate->initPlan, walker, context))
@@ -3484,6 +3485,13 @@ planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
if (walker(((SubqueryScanState *) planstate)->subplan, context))
return true;
break;
+ case T_CustomScan:
+ foreach (lc, ((CustomScanState *) planstate)->custom_ps)
+ {
+ if (walker((PlanState *) lfirst(lc), context))
+ return true;
+ }
+ break;
default:
break;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /