Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9F240B5DC24 for ; Fri, 21 Oct 2011 12:18:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 68015-05 for ; Fri, 21 Oct 2011 15:18:39 +0000 (UTC) X-Greylist: delayed 00:20:33.504742 by SQLgrey-1.8.0-rc2 Received: from hermes.marktest.pt (iota.marktest.pt [80.251.174.118]) by mail.postgresql.org (Postfix) with ESMTP id 1B1A2B5DBF9 for ; Fri, 21 Oct 2011 12:18:38 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hermes.marktest.pt (Postfix) with ESMTP id 8A2381A850D; Fri, 21 Oct 2011 15:58:04 +0100 (WEST) X-Virus-Scanned: amavisd-new at marktest.pt Received: from hermes.marktest.pt ([127.0.0.1]) by localhost (hermes.marktest.pt [127.0.0.1]) (amavisd-new, port 11124) with ESMTP id uk+ndUOHUpmZ; Fri, 21 Oct 2011 15:58:04 +0100 (WEST) Received: from Proteu (proteu.marktest.pt [10.61.90.54]) by hermes.marktest.pt (Postfix) with ESMTP id 6EFFF1A850C; Fri, 21 Oct 2011 15:58:04 +0100 (WEST) Message-ID: <49712385AAF34516B1CA6890916206DE@marktestcr.marktest.pt> From: "Oliveiros d'Azevedo Cristina" To: , References: <4EA17562.4030202@encs.concordia.ca> Subject: Re: how to temporally disable foreign key constraint check Date: Fri, 21 Oct 2011 15:58:03 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/45 X-Sequence-Number: 35929 Something like ALTER TABLE t_yourtable DROP CONSTRAINT and then ALTER TABLE t_yourtable ADD FOREIGN KEY ? Best, Oliveiros ----- Original Message ----- From: "Emi Lu" To: Sent: Friday, October 21, 2011 2:36 PM Subject: [SQL] how to temporally disable foreign key constraint check > 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 > > Thanks a lot! > Emi > > -- > Emi Lu, ENCS, Concordia University, Montreal H3G 1M8 > emilu@encs.concordia.ca +1 514 848-2424 x5884 > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql