Re: how should I do to disable the foreign key in postgres? - Mailing list pgsql-general

From A. Kretschmer
Subject Re: how should I do to disable the foreign key in postgres?
Date
Msg-id 20071118075823.GA10196@a-kretschmer.de
Whole thread Raw
In response to how should I do to disable the foreign key in postgres?  ("froast" <froast@qq.com>)
List pgsql-general
am  Wed, dem 14.11.2007, um 15:16:48 +0800 mailte froast folgendes:
> in mysql, I used :"set foreign_key_check = 0;" to disable the foreign key
> check, now I'm trying to migrate from mysql to postgres, how should I do
> to disable it?

You can define the constraints as deferrable. Later you can say:

set constraints all deferred ;



Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Primary Key
Next
From: "Filip Rembiałkowski"
Date:
Subject: Re: Compressed Backup too big