Cosmetic improvements in setup of planner's per-RTE arrays.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Aug 2019 16:33:43 +0000 (12:33 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 9 Aug 2019 16:33:43 +0000 (12:33 -0400)
commit1661a4050593a472c369a6660ffec05b6b837c57
tree626b0cf28bf546390263ffc70cab520e0b93ba0f
parentb8f2da0ac5a24f669c8d320c58646759b8fc69a5
Cosmetic improvements in setup of planner's per-RTE arrays.

Merge setup_append_rel_array into setup_simple_rel_arrays.  There's no
particularly good reason to keep them separate, and it's inconsistent
with the lack of separation in expand_planner_arrays.  The only apparent
benefit was that the fast path for trivial queries in query_planner()
doesn't need to set up the append_rel_array; but all we're saving there
is an if-test and NULL assignment, which surely ought to be negligible.

Also improve some obsolete comments.

Discussion: https://postgr.es/m/17220.1565301350@sss.pgh.pa.us
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/relnode.c
src/include/nodes/pathnodes.h
src/include/optimizer/pathnode.h