can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE
В списке pgsql-sql по дате отправления:
| От | frank@joerdens.de |
|---|---|
| Тема | can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE |
| Дата | |
| Msg-id | 20050330090732.GA10376@mail.archi-me-des.de обсуждение |
| Ответы |
Re: can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE
|
| Список | pgsql-sql |
Hello. Is it possible to change an FK constraint from NOT DEFERRABLE (the default) to DEFERRABLE without dropping and re-creating it? One idea that came up was to create a parallel set of constraints which perform the same checks as the existing ones as DEFERRABLE (and then drop the old set), but the objection there was that it'd lock the tables during the initial check. We're having a fairly serious deadlock issue and the thinking goes that Tom's suggestion here http://www.webservertalk.com/archive139-2004-8-364172.html to defer FK checks until transaction commit would maybe help. Right now we can't try this because all the FK checks where created with default settings. We'd like to avoid taking the database down for recreating foreign keys. Regards, Frank
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера