Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E2CBC2E0055 for ; Tue, 25 Mar 2008 17:27:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 95552-04 for ; Tue, 25 Mar 2008 17:26:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by postgresql.org (Postfix) with ESMTP id 200232E0049 for ; Tue, 25 Mar 2008 17:27:02 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id C9A7536AEB; Tue, 25 Mar 2008 13:27:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id C82C536A97; Tue, 25 Mar 2008 13:27:00 -0700 (PDT) Date: Tue, 25 Mar 2008 13:27:00 -0700 (PDT) From: Stephan Szabo To: kevin kempter Cc: pgsql-admin@postgresql.org Subject: Re: Deferred Constraints Issues In-Reply-To: Message-ID: <20080325132356.U1947@megazone.bigpanda.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/220 X-Sequence-Number: 28703 On Tue, 25 Mar 2008, kevin kempter wrote: > I've placed this sql in a script: > > psql my_db < begin; > SET CONSTRAINTS ALL DEFERRED ; > delete from account where 1 = 1; > delete from cust where 1 = 1; > delete from cust_type where 1 = 1; > delete from cust_orders where 1 = 1; > commit; > ! > > The tables have relationships, however I expect the 'SET CONSTRAINTS > ALL DEFERRED' to defer constraint checks. IIRC it's defined to only defer constraints created with DEFERRABLE and/or INITIALLY DEFERRED. The default is NOT DEFERRABLE.