X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9A9E15355C for ; Wed, 30 Mar 2005 19:46:17 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94441-07 for ; Wed, 30 Mar 2005 18:46:15 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 0338F5352F for ; Wed, 30 Mar 2005 19:46:14 +0100 (BST) Received: (qmail 20058 invoked by uid 500); 30 Mar 2005 19:02:55 -0000 Date: Wed, 30 Mar 2005 13:02:55 -0600 From: Bruno Wolff III To: Michael Fuhr Cc: frank@joerdens.de, pgsql-sql@postgresql.org Subject: Re: can you change an FK constraint from NOT DEFERRABLE to DEFERRABLE Message-ID: <20050330190255.GA19669@wolff.to> Mail-Followup-To: Bruno Wolff III , Michael Fuhr , frank@joerdens.de, pgsql-sql@postgresql.org References: <20050330090732.GA10376@mail.archi-me-des.de> <20050330103311.GB10376@mail.archi-me-des.de> <20050330175232.GB17708@wolff.to> <20050330175242.GA36241@winnie.fuhr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050330175242.GA36241@winnie.fuhr.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/395 X-Sequence-Number: 20874 On Wed, Mar 30, 2005 at 10:52:42 -0700, Michael Fuhr wrote: > On Wed, Mar 30, 2005 at 11:52:32AM -0600, Bruno Wolff III wrote: > > > > What version of Postgres are you running? I think ALTER CONSTRAINT is a > > relatively recent addition. > > Where are you seeing ALTER CONSTRAINT? I don't see it in gram.y > even in HEAD. I guess only in the previous messages in the thread. I remembered some recent additions to the ALTER TABLE command and incorrectly assumed that ALTER CONSTRAINT was one of those. It does look like you can only ADD and DROP constraints, not directly alter or replace them. So making a reference deferable is go to require a DROP and ADD which will need to recheck the constraint.