Search Postgresql Archives

Can pg_restore also disable table CHECK contraint?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux