Commit 262e56bc authored by Robert Haas's avatar Robert Haas

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
parent b1d5cc37
...@@ -3428,6 +3428,7 @@ bool ...@@ -3428,6 +3428,7 @@ bool
planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context) planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
{ {
Plan *plan = planstate->plan; Plan *plan = planstate->plan;
ListCell *lc;
/* initPlan-s */ /* initPlan-s */
if (planstate_walk_subplans(planstate->initPlan, walker, context)) if (planstate_walk_subplans(planstate->initPlan, walker, context))
...@@ -3484,6 +3485,13 @@ planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context) ...@@ -3484,6 +3485,13 @@ planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
if (walker(((SubqueryScanState *) planstate)->subplan, context)) if (walker(((SubqueryScanState *) planstate)->subplan, context))
return true; return true;
break; break;
case T_CustomScan:
foreach (lc, ((CustomScanState *) planstate)->custom_ps)
{
if (walker((PlanState *) lfirst(lc), context))
return true;
}
break;
default: default:
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment