aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/readfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-02-22 19:23:23 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-02-22 19:24:40 -0500
commitbdca82f44d0e0168dece56cbd53b54ba142f328f (patch)
tree0a627b98d399ddce7b4523cf1d138e721a860f9d /src/backend/nodes/readfuncs.c
parent1c51c7d5ffd407426f314b2cd317ef77f14efb1f (diff)
downloadpostgresql-bdca82f44d0e0168dece56cbd53b54ba142f328f.tar.gz
postgresql-bdca82f44d0e0168dece56cbd53b54ba142f328f.zip
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.
Diffstat (limited to 'src/backend/nodes/readfuncs.c')
-rw-r--r--src/backend/nodes/readfuncs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c
index b007caeee3e..c76884e991f 100644
--- a/src/backend/nodes/readfuncs.c
+++ b/src/backend/nodes/readfuncs.c
@@ -1171,8 +1171,8 @@ _readRangeTblEntry(void)
switch (local_node->rtekind)
{
case RTE_RELATION:
- case RTE_SPECIAL:
READ_OID_FIELD(relid);
+ READ_CHAR_FIELD(relkind);
break;
case RTE_SUBQUERY:
READ_NODE_FIELD(subquery);