Get rid of the separate EState for subplans, and just let them share the
Tom Lane <tgl@sss.pgh.pa.us>
Get rid of the separate EState for subplans, and just let them share the parent query's EState. Now that there's a single flat rangetable for both the main plan and subplans, there's no need anymore for a separate EState, and removing it allows cleaning up some crufty code in nodeSubplan.c and nodeSubqueryscan.c. Should be a tad faster too, although any difference will probably be hard to measure. This is the last bit of subsidiary mop-up work from changing to a flat rangetable.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execMain.c | modified | +93 −25 |
| src/backend/executor/execProcnode.c | modified | +2 −25 |
| src/backend/executor/execQual.c | modified | +5 −42 |
| src/backend/executor/execUtils.c | modified | +7 −42 |
| src/backend/executor/nodeSubplan.c | modified | +66 −113 |
| src/backend/executor/nodeSubqueryscan.c | modified | +8 −51 |
| src/backend/nodes/copyfuncs.c | modified | +2 −1 |
| src/backend/nodes/outfuncs.c | modified | +3 −1 |
| src/backend/optimizer/plan/planner.c | modified | +3 −1 |
| src/backend/optimizer/plan/subselect.c | modified | +55 −38 |
| src/include/executor/executor.h | modified | +1 −4 |
| src/include/executor/nodeSubplan.h | modified | +3 −3 |
| src/include/nodes/execnodes.h | modified | +3 −9 |
| src/include/nodes/plannodes.h | modified | +3 −1 |
| src/include/nodes/relation.h | modified | +3 −1 |