Re: How to turn off referential integrity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to turn off referential integrity
Дата
Msg-id 22837.1018293639@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to turn off referential integrity  (Pam Wampler <Pam_Wampler@taylorwhite.com>)
Список pgsql-novice
Pam Wampler <Pam_Wampler@taylorwhite.com> writes:
> I am using Postgresql 7.2 -- I would like to know how to turn off the
> referential integrity of tables so that I can
> do a bulk load & then turn the referential integrity back on.

There's a little dance you can do involving disabling and then
re-enabling the triggers that enforce RI.  The easiest example is
to do a "pg_dump -a" (data only) dump from a small table and look
to see how pg_dump does it.  IIRC, you don't need to touch the
triggers themselves, just hit the pg_class field that says whether
the table has triggers.

            regards, tom lane

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

Предыдущее
От: "Joshua b. Jore"
Дата:
Сообщение: Re: How to turn off referential integrity
Следующее
От: Tom Lane
Дата:
Сообщение: Re: table vs. column constraints