| От | Florian G. Pflug |
|---|---|
| Тема | Re: Changing constraints to deferrable |
| Дата | |
| Msg-id | 42417699.8030403@phlo.org обсуждение исходный текст |
| Ответ на | Changing constraints to deferrable (Greg Stark <gsstark@mit.edu>) |
| Ответы |
Re: Changing constraints to deferrable
|
| Список | pgsql-general |
Greg Stark wrote: > I want all my foreign key constraints to be deferrable. They were all created > with the default (not deferrable). > > Is it enough to just do > > update pg_constraint set condeferrable = 't' where contype = 'f'; No - the constraints are actually enforced by triggers - Just just normally don't see those triggers - but if you look into pg_triggers, you'll find them. The have "tgisconstraint" set to true, so it should be easy to find them. Try an additional "update pg_trigger set isdeferrable=true where pgisconstraint = true", and it should work.. I'm not etirely sure about the fieldnames - so better check them - e.g "\d pg_catalog.pg_trigger" could help, when typed into psql ;-) mfg, Florian Pflug
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера