Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E11C02A8817 for ; Mon, 16 Apr 2012 23:55:35 -0300 (ADT) Received: from smtp182.dfw.emailsrvr.com ([67.192.241.182]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SJyZm-0001Gq-EF for pgsql-admin@postgresql.org; Tue, 17 Apr 2012 02:55:35 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp8.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id D09A182CB for ; Mon, 16 Apr 2012 22:55:17 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp8.relay.dfw1a.emailsrvr.com (Authenticated sender: cernst-AT-zvelo.com) with ESMTPSA id A9A998229 for ; Mon, 16 Apr 2012 22:55:17 -0400 (EDT) Message-ID: <4F8CDB95.3040407@zvelo.com> Date: Mon, 16 Apr 2012 20:55:17 -0600 From: Chris Ernst Organization: Zvelo, Inc. User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120411 Thunderbird/11.0.1 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Recreate primary key without dropping foreign keys? References: <4F8B6AA1.1040709@zvelo.com> <20120416065717.70a31a6361ac5d7bdad416e8@frank.uvena.de> <4F8BD91C.6070405@zvelo.com> <4F8BDAB2.7010209@frank.uvena.de> <4F8C248E.7070307@zvelo.com> <4F8CC11A.5020003@d2.com> In-Reply-To: <4F8CC11A.5020003@d2.com> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/86 X-Sequence-Number: 39422 On 04/16/2012 07:02 PM, amador alvarez wrote: > How about deferring the FK's while recreating the PK ? > or using a temporary parallel table to be pointed by the other tables > (FK) and swap it up on the recreation. Hmm.. Interesting. But it appears that you have to declare the foreign key as deferrable at creation. Is there any way to set an existing foreign key as deferrable? - Chris