pgsql: When a row fails a CHECK constraint, show row's contents in errd

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: When a row fails a CHECK constraint, show row's contents in errd
Дата
Msg-id E1RVTtd-0002TE-FD@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
When a row fails a CHECK constraint, show row's contents in errdetail.

This should make it easier to identify which row is problematic when an
insert or update is processing many rows.

The formatting is similar to that for unique-index violation messages,
except that we limit field widths to 64 bytes since otherwise the message
could get unreasonably long.  (In particular, there's currently no attempt
to quote or escape field values that contain commas etc.)

Jan Kundrát, reviewed by Royce Ausburn, somewhat rewritten by me.

Branch
------
master

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

Modified Files
--------------
src/backend/executor/execMain.c            |   66 +++++++++++++++++++++++++++-
src/test/regress/expected/alter_table.out  |    9 ++++
src/test/regress/expected/domain.out       |    2 +
src/test/regress/expected/inherit.out      |    6 +++
src/test/regress/output/constraints.source |   20 ++++++++
5 files changed, 102 insertions(+), 1 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgsql: pg_dump: Add gettext plural support to error message
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: Suggest configure options for server developers.