| От | Keith Worthington |
|---|---|
| Тема | CHECK vs BEFORE trigger |
| Дата | |
| Msg-id | 20050422192320.M89340@narrowpathinc.com обсуждение исходный текст |
| Ответы |
Re: CHECK vs BEFORE trigger
|
| Список | pgsql-novice |
Hi All, I am about to create a new table that will store among other things two dimensions. The user requires that the smaller of the two dimesions always be referred to as the width. As I see it I can either implement a CHECK constraint and handle the error or implement a BEFORE INSERT OR UPDATE trigger that checks the two values and switches them if necessary. If I implement the trigger is there any point in implementing the CHECK? In this simple situation is there any reason to implement the CHECK and not use a trigger? Your comments will be appreciated. Kind Regards, Keith
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера