Add a back-link from IndexOptInfo structs to their parent RelOptInfo
Tom Lane <tgl@sss.pgh.pa.us>
Add a back-link from IndexOptInfo structs to their parent RelOptInfo structs. There are many places in the planner where we were passing both a rel and an index to subroutines, and now need only pass the index struct. Notationally simpler, and perhaps a tad faster.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/costsize.c | modified | +2 −3 |
| src/backend/optimizer/path/indxpath.c | modified | +57 −88 |
| src/backend/optimizer/path/orindxpath.c | modified | +4 −4 |
| src/backend/optimizer/path/pathkeys.c | modified | +3 −3 |
| src/backend/optimizer/plan/createplan.c | modified | +10 −19 |
| src/backend/optimizer/util/pathnode.c | modified | +6 −8 |
| src/backend/optimizer/util/plancat.c | modified | +2 −1 |
| src/include/nodes/relation.h | modified | +2 −1 |
| src/include/optimizer/cost.h | modified | +3 −5 |
| src/include/optimizer/pathnode.h | modified | +2 −2 |
| src/include/optimizer/paths.h | modified | +4 −7 |