Re: How to temporarily disable a table's FK constraints? - Mailing list pgsql-general

From Sam Mason
Subject Re: How to temporarily disable a table's FK constraints?
Date
Msg-id 20071105180812.GG1955@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Re: How to temporarily disable a table's FK constraints?  ("Kynn Jones" <kynnjo@gmail.com>)
List 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 by date:

Previous
From: Charles
Date:
Subject: running postgresql
Next
From: "Kynn Jones"
Date:
Subject: Re: How to temporarily disable a table's FK constraints?