Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 262e56b

Browse files
committed
Teach planstate_tree_walker about custom scans.
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
1 parent b1d5cc3 commit 262e56b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/backend/nodes/nodeFuncs.c

+8
Original file line numberDiff line numberDiff line change
@@ -3428,6 +3428,7 @@ bool
34283428
planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
34293429
{
34303430
Plan *plan = planstate->plan;
3431+
ListCell *lc;
34313432

34323433
/* initPlan-s */
34333434
if (planstate_walk_subplans(planstate->initPlan, walker, context))
@@ -3484,6 +3485,13 @@ planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
34843485
if (walker(((SubqueryScanState *) planstate)->subplan, context))
34853486
return true;
34863487
break;
3488+
case T_CustomScan:
3489+
foreach (lc, ((CustomScanState *) planstate)->custom_ps)
3490+
{
3491+
if (walker((PlanState *) lfirst(lc), context))
3492+
return true;
3493+
}
3494+
break;
34873495
default:
34883496
break;
34893497
}

0 commit comments

Comments
 (0)