1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

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
This commit is contained in:
Andres Freund
2015-05-19 01:55:10 +02:00
parent 4db485e75b
commit e4942f7a56
3 changed files with 19 additions and 1 deletions

View File

@ -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;
}