mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +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:
@ -305,7 +305,6 @@ markTargetListOrigin(ParseState *pstate, TargetEntry *tle,
|
||||
markTargetListOrigin(pstate, tle, aliasvar, netlevelsup);
|
||||
}
|
||||
break;
|
||||
case RTE_SPECIAL:
|
||||
case RTE_FUNCTION:
|
||||
case RTE_VALUES:
|
||||
/* not a simple relation, leave it unmarked */
|
||||
@ -1357,7 +1356,6 @@ expandRecordVariable(ParseState *pstate, Var *var, int levelsup)
|
||||
switch (rte->rtekind)
|
||||
{
|
||||
case RTE_RELATION:
|
||||
case RTE_SPECIAL:
|
||||
case RTE_VALUES:
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user