Re: Request for Implementation of Custom Error Messages for CHECK Constraints
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Request for Implementation of Custom Error Messages for CHECK Constraints |
| Дата | |
| Msg-id | 739719.1746921527@sss.pgh.pa.us обсуждение |
| Ответ на | Request for Implementation of Custom Error Messages for CHECK Constraints ("Miguel Ferreira" <miguelmbferreira@gmail.com>) |
| Ответы |
RE: Request for Implementation of Custom Error Messages for CHECK Constraints
|
| Список | pgsql-hackers |
"Miguel Ferreira" <miguelmbferreira@gmail.com> writes:
> I propose extending the syntax of the ALTER TABLE ADD CONSTRAINT
> statement (and potentially CREATE TABLE) to allow for the
> specification of a custom error message for each CHECK constraint.
Why don't you just choose better names for your constraints?
I'd argue that the proposed change might actually be a net loss
for usability, if it entirely obscures the fact that what happened
was a check-constraint violation.
It's also not very clear why we'd stop with check constraints,
if the desire is to get rid of database-produced error messages
in favor of something that somebody likes better.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера