Thread: [COMMITTERS] pgsql: Fix reporting of violations in ExecConstraints, again.

[COMMITTERS] pgsql: Fix reporting of violations in ExecConstraints, again.

From
Robert Haas
Date:
Fix reporting of violations in ExecConstraints, again.

We decided in f1b4c771ea74f42447dccaed42ffcdcccf3aa694 to pass the
original slot to ExecConstraints(), but that breaks when there are
BEFORE ROW triggers involved.  So we need to do reverse-map the tuples
back to the original descriptor instead, as Amit originally proposed.

Amit Langote, reviewed by Ashutosh Bapat.  One overlooked comment
fixed by me.

Discussion: http://postgr.es/m/b3a17254-6849-e542-2353-bde4e880b6a4@lab.ntt.co.jp

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c0a8ae7be392aa09dd7e148ff662013e8e148893

Modified Files
--------------
src/backend/commands/copy.c            |  6 ++--
src/backend/executor/execMain.c        | 58 +++++++++++++++++++++++++++-------
src/backend/executor/execReplication.c |  4 +--
src/backend/executor/nodeModifyTable.c |  7 ++--
src/include/executor/executor.h        |  3 +-
src/test/regress/expected/insert.out   | 21 ++++++++++--
src/test/regress/sql/insert.sql        | 21 ++++++++++--
7 files changed, 92 insertions(+), 28 deletions(-)