Re: [PATCH] Add object names to partition errors
От | Chris Bandy |
---|---|
Тема | Re: [PATCH] Add object names to partition errors |
Дата | |
Msg-id | 7985cf2f-5082-22d9-1bb4-6b280150eeae@gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Add schema and table names to partition error (Chris Bandy <bandy.chris@gmail.com>) |
Ответы |
[PATCH] Add tests for integrity violation error fields
|
Список | pgsql-hackers |
On 3/3/20 11:18 PM, Chris Bandy wrote: > On 3/3/20 10:08 AM, Alvaro Herrera wrote: >> I don't suppose you mean to >> test that every single ereport() call that includes errtable() contains >> a TABLE NAME item. > > Correct. I intend only to test the few calls I'm touching in this > It might be worthwhile for someone to perform a more thorough > review of existing errors, however. The documentation seems to say that > every error in SQLSTATE class 23 has one of these fields filled[1]. The > errors in these patches are in that class but lacked any fields. > > [1] https://www.postgresql.org/docs/current/errcodes-appendix.html By the power of grep I found another partition error that needed a field. I'm pretty happy with the way the test turned out, so I've squashed everything into a single patch. 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. If so, * Should it be one regression test (file) that discusses the significance of class 23, or * Should it be a few test cases added to the existing test files related to each feature? The former allows the helper function to be defined once, while the latter would repeat it over many files. Thanks, Chris
Вложения
В списке pgsql-hackers по дате отправления: