Thread: turning of referential integrity

turning of referential integrity

From
"XWorkers"
Date:
Hi All,
    I am wondering is there any way to turning off referential integrity
without using SET CONSTRAINTS and create table with DEFERRABLE for database
restore purpose?

    TIA.

    --Mursalin.


Re: turning of referential integrity

From
Stephan Szabo
Date:
If you are using pg_dump, you probably should be fine if you're
restoring a full database, because it should place the constraints
in after the data is loaded.  If you do a data only dump, there
is code in the dump at the very top and bottom to disable and
reenable the constraints and that should let you turn them off
and on -- however, you CANNOT define any triggers between those
two statements (let's just say it'd probably be bad).

Stephan Szabo
sszabo@bigpanda.com

On Sat, 12 Aug 2000, XWorkers wrote:

> Hi All,
>     I am wondering is there any way to turning off referential integrity
> without using SET CONSTRAINTS and create table with DEFERRABLE for database
> restore purpose?