aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_relation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_relation.c')
-rw-r--r--src/backend/parser/parse_relation.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 497c726f314..033ed411fde 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -894,6 +894,7 @@ addRangeTableEntry(ParseState *pstate,
lockmode = isLockedRefname(pstate, refname) ? RowShareLock : AccessShareLock;
rel = parserOpenTable(pstate, relation, lockmode);
rte->relid = RelationGetRelid(rel);
+ rte->relkind = rel->rd_rel->relkind;
/*
* Build the list of effective column names using user-supplied aliases
@@ -956,6 +957,7 @@ addRangeTableEntryForRelation(ParseState *pstate,
rte->rtekind = RTE_RELATION;
rte->alias = alias;
rte->relid = RelationGetRelid(rel);
+ rte->relkind = rel->rd_rel->relkind;
/*
* Build the list of effective column names using user-supplied aliases