Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 9D0519A4AA5 for ; Mon, 16 Jul 2012 08:22:04 -0300 (ADT) Received: from szxga02-in.huawei.com ([119.145.14.65]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SqjNH-0004m1-4t for pgsql-bugs@postgresql.org; Mon, 16 Jul 2012 11:22:03 +0000 Received: from 172.24.2.119 (EHLO szxeml212-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.1.9-GA FastPath queued) with ESMTP id ALQ35555; Mon, 16 Jul 2012 19:21:34 +0800 (CST) Received: from SZXEML411-HUB.china.huawei.com (10.82.67.138) by szxeml212-edg.china.huawei.com (172.24.2.181) with Microsoft SMTP Server (TLS) id 14.1.323.3; Mon, 16 Jul 2012 19:19:51 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml411-hub.china.huawei.com (10.82.67.138) with Microsoft SMTP Server id 14.1.323.3; Mon, 16 Jul 2012 19:19:46 +0800 From: Amit Kapila To: "'Noah Misch'" CC: , References: <20120715212344.GA7475@tornado.leadboat.com> In-Reply-To: <20120715212344.GA7475@tornado.leadboat.com> Subject: Re: BUG #6712: PostgreSQL 9.2 beta2: alter table drop constraint does not work on inherited master table Date: Mon, 16 Jul 2012 16:49:46 +0530 Message-ID: <006001cd6344$e879ba30$b96d2e90$@kapila@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac1i0CIx5DBv/ADZQaa6f/vTe0J8YwAcrjsg Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201207/119 X-Sequence-Number: 33595 From: Noah Misch [mailto:noah@leadboat.com] Sent: Monday, July 16, 2012 2:54 AM > One can construct similar bugs around dropping foreign key and exclusion > constraints. Though it may be irrelevant for command semantics, additionally > using connoinherit = 't' for contype = 't' (CONSTRAINT_TRIGGER) would > more-accurately represent the nature of those constraints. Code Changes ---------------- I will make changes in following functions to ensure that connoinherit should be appropriately set(pass the value as true). a. index_constraint_create() b. ATAddForeignKeyConstraint() c. CreateTrigger(). Other places I have checked seems to be fine. Test -------- I will create testcases similar to mentioned in bug report for a. unique key case, same as in bug-report b. foreign key case c. exclusion constraint case > Care to prepare a patch with a test case addition? Let me know if above is sufficient or shall I include anything more in patch. With Regards, Amit Kapila.