mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +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:
@ -1927,6 +1927,7 @@ _copyRangeTblEntry(RangeTblEntry *from)
|
||||
|
||||
COPY_SCALAR_FIELD(rtekind);
|
||||
COPY_SCALAR_FIELD(relid);
|
||||
COPY_SCALAR_FIELD(relkind);
|
||||
COPY_NODE_FIELD(subquery);
|
||||
COPY_SCALAR_FIELD(jointype);
|
||||
COPY_NODE_FIELD(joinaliasvars);
|
||||
|
Reference in New Issue
Block a user