Disable foreign key constraints

Started by Bruce Momjianover 23 years ago3 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

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, Pennsylvania 19026
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#1)
Re: Disable foreign key constraints

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

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: Disable foreign key constraints

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, Pennsylvania 19026