From bdca82f44d0e0168dece56cbd53b54ba142f328f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 22 Feb 2011 19:23:23 -0500 Subject: 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. --- src/backend/nodes/equalfuncs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/nodes/equalfuncs.c') diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index dd332f19f00..c896f49ff6f 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -2286,6 +2286,7 @@ _equalRangeTblEntry(RangeTblEntry *a, RangeTblEntry *b) { COMPARE_SCALAR_FIELD(rtekind); COMPARE_SCALAR_FIELD(relid); + COMPARE_SCALAR_FIELD(relkind); COMPARE_NODE_FIELD(subquery); COMPARE_SCALAR_FIELD(jointype); COMPARE_NODE_FIELD(joinaliasvars); -- cgit v1.2.3