aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/createplan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r--src/backend/optimizer/plan/createplan.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index de2779a1a25..c34b9b8c38e 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -4587,16 +4587,8 @@ make_modifytable(CmdType operation, bool canSetTag,
node->plan.lefttree = NULL;
node->plan.righttree = NULL;
node->plan.qual = NIL;
-
- /*
- * Set up the visible plan targetlist as being the same as the first
- * RETURNING list. This is for the use of EXPLAIN; the executor won't pay
- * any attention to the targetlist.
- */
- if (returningLists)
- node->plan.targetlist = copyObject(linitial(returningLists));
- else
- node->plan.targetlist = NIL;
+ /* setrefs.c will fill in the targetlist, if needed */
+ node->plan.targetlist = NIL;
node->operation = operation;
node->canSetTag = canSetTag;