1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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
This commit is contained in:
Tom Lane
2009-08-01 19:59:41 +00:00
parent 2487d872e0
commit b680ae4bdb
20 changed files with 173 additions and 41 deletions

View File

@ -23,6 +23,7 @@
[NO_PID]: ecpg_execute on line 31: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_check_PQresult on line 31: ERROR: duplicate key value violates unique constraint "test_pkey"
DETAIL: Key (i)=(7) already exists.
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlstate 23505 (sqlcode -239) on line 31: duplicate key value violates unique constraint "test_pkey" on line 31
[NO_PID]: sqlca: code: -239, state: 23505