Improve error reporting for tuple-routing failures.
Robert Haas <rhaas@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/index/genam.c | modified | +4 −0 |
| src/backend/catalog/partition.c | modified | +13 −17 |
| src/backend/executor/execMain.c | modified | +113 −19 |
| src/backend/utils/adt/ruleutils.c | modified | +28 −9 |
| src/include/catalog/partition.h | modified | +7 −1 |
| src/include/utils/ruleutils.h | modified | +2 −0 |
| src/test/regress/expected/insert.out | modified | +34 −4 |
| src/test/regress/sql/insert.sql | modified | +30 −0 |
Discussion
- error detail when partition not found 5 messages · 2017-02-21 → 2017-03-03