Re: Find all foreign keys and dropping them from a script.
В списке pgsql-novice по дате отправления:
| От | Michael Fuhr |
|---|---|
| Тема | Re: Find all foreign keys and dropping them from a script. |
| Дата | |
| Msg-id | 20060418145254.GA82223@winnie.fuhr.org обсуждение |
| Ответ на | Find all foreign keys and dropping them from a script. ("Robert Landsmeer" <r.landsmeer@wis.nl>) |
| Список | pgsql-novice |
On Tue, Apr 18, 2006 at 04:05:48PM +0200, Robert Landsmeer wrote: > To update the database we have a script that will execute all the data > updates of the product. Since the updater isn't aware of what updates > need to be done before other updates FK-wise we get all kinds of errors > about incorrect data, and the script fails. So we want to drop all > foreign keys, insert a lot of data, and then re-add all foreign keys. Are the updates all done in the same transaction? If so then you might be able to use deferrable foreign key constraints. Search the following documentation for the words "DEFERRABLE" and "DEFERRED": http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html http://www.postgresql.org/docs/8.1/interactive/sql-set-constraints.html -- Michael Fuhr
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера