| От | wsheldah@lexmark.com |
|---|---|
| Тема | How do I drop or change a foreign key? |
| Дата | |
| Msg-id | 200108231350.JAA22144@interlock2.lexmark.com обсуждение исходный текст |
| Ответы |
Re: How do I drop or change a foreign key?
|
| Список | pgsql-general |
After I created my tables, I went back and added foreign keys to them. Now I need to change one of the foreign keys to 'ON DELETE CASCADE' behaviour so that related records are automatically deleted, rather than causing an error when a record in the parent table is deleted. I know the name of the foreign key, but none of the standard 'drop' commands seem to apply to it. Am I forced to move the data to a temp table, drop the table and recreate, then move the data back? Improvements to the ALTER commands are already high on my personal list of desired improvements; I run into this sort of thing fairly consistently as users change their minds or clarify their requirements. Thanks, Wes Sheldahl
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера