Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2011-02-23 00:23:23 +0000
committerTom Lane2011-02-23 00:24:40 +0000
commitbdca82f44d0e0168dece56cbd53b54ba142f328f (patch)
tree0a627b98d399ddce7b4523cf1d138e721a860f9d /src/backend/nodes/print.c
parent1c51c7d5ffd407426f314b2cd317ef77f14efb1f (diff)
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/print.c')
-rw-r--r--src/backend/nodes/print.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c
index 14487f25a10..cd119dbabb8 100644
--- a/src/backend/nodes/print.c
+++ b/src/backend/nodes/print.c
@@ -265,8 +265,8 @@ print_rt(List *rtable)
switch (rte->rtekind)
{
case RTE_RELATION:
- printf("%d\t%s\t%u",
- i, rte->eref->aliasname, rte->relid);
+ printf("%d\t%s\t%u\t%c",
+ i, rte->eref->aliasname, rte->relid, rte->relkind);
break;
case RTE_SUBQUERY:
printf("%d\t%s\t[subquery]",
@@ -276,10 +276,6 @@ print_rt(List *rtable)
printf("%d\t%s\t[join]",
i, rte->eref->aliasname);
break;
- case RTE_SPECIAL:
- printf("%d\t%s\t[special]",
- i, rte->eref->aliasname);
- break;
case RTE_FUNCTION:
printf("%d\t%s\t[rangefunction]",
i, rte->eref->aliasname);