Thread: Disable foreign key constraints

Disable foreign key constraints

From
Bruce Momjian
Date:
Do we have any way to disable foreign key constraints?  If not, I would
like to add it to TODO.  I was asked for this feature several times at
O'Reilly.  

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Disable foreign key constraints

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Do we have any way to disable foreign key constraints?

You can drop and re-add the constraint relatively painlessly in 7.3.
Formerly it took hacking on pg_trigger.
        regards, tom lane


Re: Disable foreign key constraints

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Do we have any way to disable foreign key constraints?
> 
> You can drop and re-add the constraint relatively painlessly in 7.3.
> Formerly it took hacking on pg_trigger.

OK, let's see if it comes up after 7.3.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026