mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-11 19:20:40 +08:00
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
This commit is contained in:
parent
b1d5cc375b
commit
262e56bcae
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user