Re: How to temporarily disable a table's FK constraints?

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: How to temporarily disable a table's FK constraints?
Дата
Msg-id 20071105180812.GG1955@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: How to temporarily disable a table's FK constraints?  ("Kynn Jones" <kynnjo@gmail.com>)
Список pgsql-general
On Mon, Nov 05, 2007 at 01:52:54PM -0400, Kynn Jones wrote:
> BTW, I realize that I can just drop and reinstate constraints, but
> from the point of view of writing a Perl script to do all this, it
> would be much easier if I could just disable temporarily all the FK
> constraints on a table.

Do you really want to disable the foreign key constraint, or just defer
their checking till you commit the transaction?  If you just want to
defer checking, then [1] may help.


  Sam

 [1] http://www.postgresql.org/docs/current/static/sql-set-constraints.html

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

Предыдущее
От: Charles
Дата:
Сообщение: running postgresql
Следующее
От: "Kynn Jones"
Дата:
Сообщение: Re: How to temporarily disable a table's FK constraints?