| От | Rich Shepard |
|---|---|
| Тема | Re: Adding Foreign Key Constraint To Existing Table |
| Дата | |
| Msg-id | alpine.LNX.2.00.1107011502460.31349@salmo.appl-ecosys.com обсуждение |
| Ответ на | Re: Adding Foreign Key Constraint To Existing Table (Thom Brown <thom@linux.com>) |
| Список | pgsql-general |
On Fri, 1 Jul 2011, Thom Brown wrote: > By the way, rather than dropping the foreign key then recreating it, you > could always do this: > > ALTER TABLE tablename DISABLE TRIGGER ALL; > > Then it would ignore the foreign key trigger and you could put in > mischievous values... but remember to enable it again (replace DISABLE > with ENABLE). You'll have to be a superuser to do it though. Thom, Valuable information, thanks. I try to get the table structure correct before loading it into a database. In this case I was copying structure (with minor mods) from an existing environmental database and it took me a while to notice the original authors used synthetic keys when they are not needed. So, I got rid of those keys. Rich
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера