Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id D613D18E38D9 for ; Thu, 12 Jan 2012 12:54:03 -0400 (AST) Received: from cerberus.pinpointresearch.com ([66.7.238.130] helo=polaris.pinpointresearch.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RlNub-0001pe-Mo for pgsql-sql@postgresql.org; Thu, 12 Jan 2012 16:54:03 +0000 Received: from betelgeuse.pinpointresearch.com (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id EE29BE00EC83; Thu, 12 Jan 2012 08:53:47 -0800 (PST) Message-ID: <4F0F101B.5050105@pinpointresearch.com> Date: Thu, 12 Jan 2012 08:53:47 -0800 From: Steve Crawford User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Lightning/1.0b2 Thunderbird/3.1.16 MIME-Version: 1.0 To: Carlos Mennens CC: "PostgreSQL (SQL)" Subject: Re: Unable To Modify Table References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/47 X-Sequence-Number: 36218 On 01/12/2012 08:42 AM, Carlos Mennens wrote: > I seem to have an issue where I can't modify a table due to another > tables foreign key association: > > ... > > How does one accomplish my goal? Is this difficult to change or once > that foreign key is created, are you stuck with that particular > constraint? > Try updating the values in both tables within a transaction with constraints set to deferred: http://www.postgresql.org/docs/current/static/sql-set-constraints.html Cheers, Steve