aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-05-19 01:55:10 +0200
committerAndres Freund <andres@anarazel.de>2015-05-19 01:55:10 +0200
commite4942f7a56efcfaabed5db7bde29ee21bef2f6e2 (patch)
tree32aad3922e58be2380c7ac32aa38b2335ecd72e4 /src/backend/executor/nodeModifyTable.c
parent4db485e75b9672126963ae4052b50f473b30a097 (diff)
downloadpostgresql-e4942f7a56efcfaabed5db7bde29ee21bef2f6e2.tar.gz
postgresql-e4942f7a56efcfaabed5db7bde29ee21bef2f6e2.zip
Attach ON CONFLICT SET ... WHERE to the correct planstate.
The previous coding was a leftover from attempting to hang all the on conflict logic onto modify table's child nodes. It appears to not have actually caused problems except for explain. Add test exercising the broken and some other code paths. Author: Peter Geoghegan and Andres Freund
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
-rw-r--r--src/backend/executor/nodeModifyTable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index 89f1f57ae3d..8112fb45b81 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -1697,7 +1697,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
ExprState *qualexpr;
qualexpr = ExecInitExpr((Expr *) node->onConflictWhere,
- mtstate->mt_plans[0]);
+ &mtstate->ps);
resultRelInfo->ri_onConflictSetWhere = (List *) qualexpr;
}