On 10/21/2011 09:36 PM, Emi Lu wrote:
Good morning,


Is there a way to temporally disabled foreign key constraints something
like

SET FOREIGN_KEY_CHECKS=0

When population is done, will set FOREIGN_KEY_CHECKS=1

If you really, really want to do this you can do it by disabling the triggers that enforce the checks on particular tables. This must be done table-by-table, there's no global way to do it.

Use ALTER TABLE ... DISABLE TRIGGER to do it. See:

http://www.postgresql.org/docs/current/static/sql-altertable.html

--
Craig Ringer


--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to