Re: Can one turn off constraints/indices temporarily? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Can one turn off constraints/indices temporarily?
Date
Msg-id 12993.1138892232@sss.pgh.pa.us
Whole thread Raw
In response to Can one turn off constraints/indices temporarily?  (<kynn@panix.com>)
List pgsql-novice
<kynn@panix.com> writes:
> Now, suppose that one had to insert many records at once.  Is it
> possible to mimic the above strategy by turning off the constraints
> and indexing temporarily (without dropping them altogether), and
> turning them back on after all the inserts have been made.

No.  You can drop and re-add them if you have a mind to.  People
do this fairly often with indexes and foreign key constraints ---
there's no advantage in doing it for CHECK constraints though.

            regards, tom lane

pgsql-novice by date:

Previous
From:
Date:
Subject: Can one turn off constraints/indices temporarily?
Next
From: Michael Swierczek
Date:
Subject: pg_dump - sort data?