| От | Gregory Wood |
|---|---|
| Тема | Re: Can't use subselect in check constraint |
| Дата | |
| Msg-id | 046601c1899f$f4e46a20$7889ffcc@comstock.com обсуждение исходный текст |
| Ответ на | Re: Can't use subselect in check constraint (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Список | pgsql-general |
> > Is this something that will change anytime soon? I could not find anything about it in the todo... > > My understanding is that check constraints can't be queries; at least I > have never seen them. Considering that you could potentially have to reevaluate each CHECK constraint every time you updated any table in the database, I would think it would be a *real* bad idea to allow that. There is no way to automatically create the triggers needed to satisfy "When should I check the constraint?" If it can't be constructed as a check against a literal value or values, or a foreign key constraint, it should be up to the user to maintain that consistency check with the appropriate triggers. Greg
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера