Re: Suspend Referential Integrity?

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Suspend Referential Integrity?
Дата
Msg-id 20050809133106.GA10109@winnie.fuhr.org
обсуждение исходный текст
Ответ на Suspend Referential Integrity?  (Jim Jarrett <jarrett@rpa.net>)
Список pgsql-novice
On Tue, Aug 09, 2005 at 09:14:50AM -0400, Jim Jarrett wrote:
> Is there a way to temporarily suspend RI checking so I can load the data and
> then fix it later?

You could drop and then re-create the foreign key constraints with
ALTER TABLE, or you could create the constraints as DEFERRABLE and
defer them during the load with SET CONSTRAINTS (or make them
INITIALLY DEFERRED).

http://www.postgresql.org/docs/8.0/static/sql-altertable.html
http://www.postgresql.org/docs/8.0/static/sql-createtable.html
http://www.postgresql.org/docs/8.0/static/sql-set-constraints.html

--
Michael Fuhr

В списке pgsql-novice по дате отправления:

Предыдущее
От: Jim Jarrett
Дата:
Сообщение: Suspend Referential Integrity?
Следующее
От: Sean Davis
Дата:
Сообщение: Re: Suspend Referential Integrity?