Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YdhBB-0001Jb-Id for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Apr 2015 15:37:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YdhBA-0001wg-N7 for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Apr 2015 15:37:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YdhBA-0001wa-5Q for pgsql-bugs@postgresql.org; Thu, 02 Apr 2015 15:37:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YdhB6-0003vl-Gu for pgsql-bugs@postgresql.org; Thu, 02 Apr 2015 15:37:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t32Fb5Bd010871; Thu, 2 Apr 2015 11:37:05 -0400 From: Tom Lane To: =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JTQtdCz0YLRj9GA0ZHQsg==?= cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12946: pg_dump/pg_restore not restore data for inherit tables In-reply-to: References: <20150402123644.2573.95526@wrigleys.postgresql.org> <8169.1427982590@sss.pgh.pa.us> Comments: In-reply-to =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JTQtdCz0YLRj9GA0ZHQsg==?= message dated "Thu, 02 Apr 2015 19:54:28 +0500" Date: Thu, 02 Apr 2015 11:37:05 -0400 Message-ID: <10870.1427989025@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JTQtdCz0YLRj9GA0ZHQsg==?= writes: > However, in accordance with the documentation > http://www.postgresql.org/docs/9.4/static/ddl-inherit.html(quote: "It must > also include check constraints with the same names and check expressions as > those of the parent."), > alter table t2 alter column a drop not null; > the result must be a error. Ah. Yeah, that's a known issue: NOT NULL constraints don't currently have enough infrastructure for ALTER TABLE to realize whether they're inherited or not. The system should indeed prevent you from doing DROP NOT NULL here, but it doesn't. I think there's an item for that on the TODO list. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs