diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-08-12 11:58:35 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-08-12 11:58:35 -0400 |
commit | 3c926587b5928795e54dfea65c712a604f63cdeb (patch) | |
tree | 6c2f15f54c12d3e5dafcd6874f6897ed2dda80d5 /src/include/executor/executor.h | |
parent | 5ee190f8ec37c1bbfb3061e18304e155d600bc8e (diff) | |
download | postgresql-3c926587b5928795e54dfea65c712a604f63cdeb.tar.gz postgresql-3c926587b5928795e54dfea65c712a604f63cdeb.zip |
Remove EState.es_range_table_array.
Now that list_nth is O(1), there's no good reason to maintain a
separate array of RTE pointers rather than indexing into
estate->es_range_table. Deleting the array doesn't save all that
much either; but just on cleanliness grounds, it's better not to
have duplicate representations of the identical information.
Discussion: https://postgr.es/m/14960.1565384592@sss.pgh.pa.us
Diffstat (limited to 'src/include/executor/executor.h')
-rw-r--r-- | src/include/executor/executor.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 1fb28b4596b..39c8b3bbbe8 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -535,8 +535,7 @@ extern void ExecInitRangeTable(EState *estate, List *rangeTable); static inline RangeTblEntry * exec_rt_fetch(Index rti, EState *estate) { - Assert(rti > 0 && rti <= estate->es_range_table_size); - return estate->es_range_table_array[rti - 1]; + return (RangeTblEntry *) list_nth(estate->es_range_table, rti - 1); } extern Relation ExecGetRangeTableRelation(EState *estate, Index rti); |