[PATCH] Add tests for integrity violation error fields

Поиск
Список
Период
Сортировка
От Chris Bandy
Тема [PATCH] Add tests for integrity violation error fields
Дата
Msg-id 0731def8-978e-0285-04ee-582762729b38@gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add object names to partition errors  (Chris Bandy <bandy.chris@gmail.com>)
Список pgsql-hackers
On 3/4/20 2:54 AM, Chris Bandy wrote:
> I've also convinced myself that the number of integrity errors in the
> entire codebase is manageable to test. If others think it is worthwhile,
> I can spend some time over the next week to expand this test approach to
> cover _all_ SQLSTATE class 23 errors.

Done. Please find attached two patches that (1) test all but one reports
of integrity violations and (2) attach object names to the handful that
lacked them.

I decided to include error messages in the tests so that the next person
to change the message would be mindful of the attached fields and vice
versa. I thought these might be impacted by locale, but `make check
LANG=de_DE.utf8` passes for me. Is that command the right way to verify
that?

With these patches, behavior matches the documentation which states:
"[object] names are supplied in separate fields of the error report
message so that applications need not try to extract them from the
possibly-localized human-readable text of the message. As of PostgreSQL
9.3, complete coverage for this feature exists only for errors in
SQLSTATE class 23..."


Thanks,
Chris

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: More tests to stress directly checksum_impl.h
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager