-
由 Jimmy Yih 提交于
Currently, the error reporting for duplicate key value violation for unique indexes does not contain useful information for users when debugging. This commit backports two commits from PostgreSQL (shown below) and updates our multikey tuplesort to use the same. Now the error will display the first instance of a duplicate key violation. Authors: Jimmy Yih and Abhijit Subramanya commit b680ae4b Author: Tom Lane <tgl@sss.pgh.pa.us> Date: Sat Aug 1 19:59:41 2009 +0000 Improve unique-constraint-violation error messages to include the exact values being complained of. In passing, also remove the arbitrary length limitation in the similar error detail message for foreign key violations. Itagaki Takahiro Conflicts: contrib/citext/expected/citext.out contrib/citext/expected/citext_1.out src/backend/access/common/indextuple.c src/backend/access/index/genam.c src/backend/access/nbtree/nbtinsert.c src/backend/utils/adt/ri_triggers.c src/backend/utils/adt/ruleutils.c src/include/access/genam.h src/include/access/itup.h src/include/utils/builtins.h src/test/regress/expected/alter_table.out src/test/regress/expected/arrays.out src/test/regress/expected/create_index.out src/test/regress/expected/plpgsql.out src/test/regress/expected/transactions.out src/test/regress/expected/uuid.out src/test/regress/output/constraints.source src/test/regress/output/tablespace.source commit 527f0ae3 Author: Tom Lane <tgl@sss.pgh.pa.us> Date: Sat Aug 1 20:59:17 2009 +0000 Department of second thoughts: let's show the exact key during unique index build failures, too. Refactor a bit more since that error message isn't spelled the same. Conflicts: src/backend/access/nbtree/nbtinsert.c src/backend/utils/sort/tuplesort.c src/test/regress/expected/alter_table.out src/test/regress/expected/create_index.out
4022c338