mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Add a relkind field to RangeTblEntry to avoid some syscache lookups.
The recent additions for FDW support required checking foreign-table-ness in several places in the parse/plan chain. While it's not clear whether that would really result in a noticeable slowdown, it seems best to avoid any performance risk by keeping a copy of the relation's relkind in RangeTblEntry. That might have some other uses later, anyway. Per discussion.
This commit is contained in:
@ -1671,7 +1671,6 @@ range_table_walker(List *rtable,
|
||||
switch (rte->rtekind)
|
||||
{
|
||||
case RTE_RELATION:
|
||||
case RTE_SPECIAL:
|
||||
case RTE_CTE:
|
||||
/* nothing to do */
|
||||
break;
|
||||
@ -2374,7 +2373,6 @@ range_table_mutator(List *rtable,
|
||||
switch (rte->rtekind)
|
||||
{
|
||||
case RTE_RELATION:
|
||||
case RTE_SPECIAL:
|
||||
case RTE_CTE:
|
||||
/* we don't bother to copy eref, aliases, etc; OK? */
|
||||
break;
|
||||
|
Reference in New Issue
Block a user