Improve error reporting for tuple-routing failures.
authorRobert Haas <rhaas@postgresql.org>
Fri, 3 Mar 2017 03:37:41 +0000 (09:07 +0530)
committerRobert Haas <rhaas@postgresql.org>
Fri, 3 Mar 2017 03:39:52 +0000 (09:09 +0530)
commit5a73e17317e91912b2755f7960d5bf31d374cf31
tree9df368817ebdf24e6eca7a2a47dbccdbc67808b0
parentbe6ed6451c693d9121d357996cbc21b06058b9c1
Improve error reporting for tuple-routing failures.

Currently, the whole row is shown without column names.  Instead,
adopt a style similar to _bt_check_unique() in ExecFindPartition()
and show the failing key: (key1, ...) = (val1, ...).

Amit Langote, per a complaint from Simon Riggs.  Reviewed by me;
I also adjusted the grammar in one of the comments.

Discussion: http://postgr.es/m/9f9dc7ae-14f0-4a25-5485-964d9bfc19bd@lab.ntt.co.jp
src/backend/access/index/genam.c
src/backend/catalog/partition.c
src/backend/executor/execMain.c
src/backend/utils/adt/ruleutils.c
src/include/catalog/partition.h
src/include/utils/ruleutils.h
src/test/regress/expected/insert.out
src/test/regress/sql/insert.sql