| От | Tom Lane |
|---|---|
| Тема | Re: converting FK's to "DEFERRABLE" |
| Дата | |
| Msg-id | 23996.1095449230@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | converting FK's to "DEFERRABLE" (Vivek Khera <khera@kcilink.com>) |
| Ответы |
Re: converting FK's to "DEFERRABLE"
|
| Список | pgsql-general |
Vivek Khera <khera@kcilink.com> writes:
> Anyhow, is there some trickier way to make an FK deferrable?
Hack its pg_constraint.condeferrable and pg_constraint.condeferred
fields (the latter is the INITIALLY DEFERRED flag). You will also
need to find the triggers that implement the constraint and update
their pg_trigger.tgdeferrable and pg_trigger.tginitdeferred copies
of these values. Then start fresh backend sessions and I think
you're there.
AFAIK the most reliable way to find the triggers is to follow the
linking entries in pg_depend.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера