diff options
Diffstat (limited to 'src/backend/rewrite/rewriteManip.c')
-rw-r--r-- | src/backend/rewrite/rewriteManip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index 708e5453e31..101c39553ae 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -1424,8 +1424,8 @@ ReplaceVarsFromTargetList_callback(Var *var, * If generating an expansion for a var of a named rowtype (ie, this * is a plain relation RTE), then we must include dummy items for * dropped columns. If the var is RECORD (ie, this is a JOIN), then - * omit dropped columns. Either way, attach column names to the - * RowExpr for use of ruleutils.c. + * omit dropped columns. In the latter case, attach column names to + * the RowExpr for use of the executor and ruleutils.c. */ expandRTE(rcon->target_rte, var->varno, var->varlevelsup, var->location, @@ -1438,7 +1438,7 @@ ReplaceVarsFromTargetList_callback(Var *var, rowexpr->args = fields; rowexpr->row_typeid = var->vartype; rowexpr->row_format = COERCE_IMPLICIT_CAST; - rowexpr->colnames = colnames; + rowexpr->colnames = (var->vartype == RECORDOID) ? colnames : NIL; rowexpr->location = var->location; return (Node *) rowexpr; |