Re: How to turn off referential integrity - Mailing list pgsql-novice

From Tom Lane
Subject Re: How to turn off referential integrity
Date
Msg-id 22837.1018293639@sss.pgh.pa.us
Whole thread Raw
In response to How to turn off referential integrity  (Pam Wampler <Pam_Wampler@taylorwhite.com>)
List pgsql-novice
Pam Wampler <Pam_Wampler@taylorwhite.com> writes:
> I am using Postgresql 7.2 -- I would like to know how to turn off the
> referential integrity of tables so that I can
> do a bulk load & then turn the referential integrity back on.

There's a little dance you can do involving disabling and then
re-enabling the triggers that enforce RI.  The easiest example is
to do a "pg_dump -a" (data only) dump from a small table and look
to see how pg_dump does it.  IIRC, you don't need to touch the
triggers themselves, just hit the pg_class field that says whether
the table has triggers.

            regards, tom lane

pgsql-novice by date:

Previous
From: "Joshua b. Jore"
Date:
Subject: Re: How to turn off referential integrity
Next
From: Tom Lane
Date:
Subject: Re: table vs. column constraints