Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message
В списке pgsql-hackers по дате отправления:
| От | Jan Kundrát |
|---|---|
| Тема | Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message |
| Дата | |
| Msg-id | 4EBBB99C.70306@flaska.net обсуждение исходный текст |
| Ответ на | Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message ("Dickson S. Guedes" <listas@guedesoft.net>) |
| Список | pgsql-hackers |
On 11/10/11 12:41, Dickson S. Guedes wrote: >> jkt=> UPDATE tbl SET a = -a; >> ERROR: new row for relation "tbl" violates check constraint "tbl_a_check" >> DETAIL: New row with data (x, -10) violates check constraint "tbl_a_check". >> >> The last line, the detailed error message, is added by the patch. > > The patch uses 'New row with data ....' but it was an UPDATE, if you > go further with this patch, IMO the message should be fixed too. I'm not sure whether the code can determine whether the check gets triggered by an UPDATE or an INSERT (both commands lead to this code path). Please note that the already-existing error message (the "ERROR: " line in the output I enclosed) already uses the phrase "new row". That said, I'll of course be more than happy to include whatever string which fits better, and am open to any suggestions. Cheers, Jan -- Trojita, a fast e-mail client -- http://trojita.flaska.net/
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера