| От | Raymond O'Donnell |
|---|---|
| Тема | Re: How to add "on delete cascade" constraints |
| Дата | |
| Msg-id | 4F9AF948.9030102@iol.ie обсуждение исходный текст |
| Ответ на | Re: How to add "on delete cascade" constraints (Alexander Farber <alexander.farber@gmail.com>) |
| Список | pgsql-general |
On 27/04/2012 20:40, Alexander Farber wrote: > So it's not a problem to drop and recreate the FOREIGN KEYs? No, unless you're doing it on a production system, and someone inserts a value that'll doesn't agree with the foreign key while it's gone. Adding the constraint back in may take a while (depending on how big your table is) as contents of the columns involved need to be checked to ensure they contain valid values. Also, I think maybe an exclusive lock is required, which will block out other users - not sure about this - others on this list will know. > And can I use START TRANSACTION while doing it? Yes, absolutely - transactional DDL is one of PG's great strengths. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера