Example PostgreSQL Execution (cont)
Initially InitPlan() invokes ExecInitNode() on plan tree root.
ExecInitNode() sees a NestedLoop node ...
so dispatches to ExecInitNestLoop() to set up iterator
then invokes ExecInitNode() on left and right sub-plans
in left subPlan, ExecInitNode() sees an IndexScan node
so dispatches to ExecInitIndexScan() to set up iterator
in right sub-plan, ExecInitNode() sees a SeqScan node
so dispatches to ExecInitSeqScan() to set up iterator
Result: a plan state tree with same structure as plan tree.
|