diff options
| author | Tom Lane | 2019-08-09 16:33:43 +0000 |
|---|---|---|
| committer | Tom Lane | 2019-08-09 16:33:43 +0000 |
| commit | 1661a4050593a472c369a6660ffec05b6b837c57 (patch) | |
| tree | 626b0cf28bf546390263ffc70cab520e0b93ba0f /src/include/nodes | |
| parent | b8f2da0ac5a24f669c8d320c58646759b8fc69a5 (diff) | |
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
Diffstat (limited to 'src/include/nodes')
| -rw-r--r-- | src/include/nodes/pathnodes.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index e3c579ee44..13b147d85d 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -204,17 +204,16 @@ struct PlannerInfo /* * simple_rte_array is the same length as simple_rel_array and holds - * pointers to the associated rangetable entries. This lets us avoid - * rt_fetch(), which can be a bit slow once large inheritance sets have - * been expanded. + * pointers to the associated rangetable entries. Using this is a shade + * faster than using rt_fetch(), mostly due to fewer indirections. */ RangeTblEntry **simple_rte_array; /* rangetable as an array */ /* * append_rel_array is the same length as the above arrays, and holds * pointers to the corresponding AppendRelInfo entry indexed by - * child_relid, or NULL if none. The array itself is not allocated if - * append_rel_list is empty. + * child_relid, or NULL if the rel is not an appendrel child. The array + * itself is not allocated if append_rel_list is empty. */ struct AppendRelInfo **append_rel_array; |
