Can pg_restore also disable table CHECK contraint?

From: "CN" <cnliou9(at)fastmail(dot)fm>
To: pgsql-general(at)postgresql(dot)org
Subject: Can pg_restore also disable table CHECK contraint?
Date: 2005-02-05 03:59:11
Message-ID: 1107575951.18376.214382329@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

Some of my tables include table check constraints like this:

CREATE TABLE t1 (
CHECK(MyCheckFun(c1,c2)),
c1 int,
c2 int
) without oids;

Function MyCheckFun() references to another table and checks if the
related rows exist. MyCheckFun() raises exception and aborts pg_restore
due to the uncontrolled restore order of tables data.

Option --disable-triggers appears to be not disabling CHECK in such
case. Probably my requirement is exordinary, but is it possible to
"enhance" pg_restore so that it also ignores CHECK constraint?

Thanks!

CN

Browse pgsql-general by date

  From Date Subject
Next Message Venkatesh Babu 2005-02-05 10:51:24 Re: Update command too slow
Previous Message Tzahi Fadida 2005-02-05 03:17:34 Re: Is there a peer-to-peer server solution with PG?