mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user