Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 563811337C79 for ; Thu, 12 May 2011 12:24:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 80290-01-3 for ; Thu, 12 May 2011 15:24:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 43FCF1337C53 for ; Thu, 12 May 2011 12:24:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4CFODnp016598; Thu, 12 May 2011 11:24:13 -0400 (EDT) To: "Panos Christeas" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6024: pg_dump won't dump ALTERed inherited fields In-reply-to: <201105120914.p4C9ELvP076791@wwwmaster.postgresql.org> References: <201105120914.p4C9ELvP076791@wwwmaster.postgresql.org> Comments: In-reply-to "Panos Christeas" message dated "Thu, 12 May 2011 09:14:21 +0000" Date: Thu, 12 May 2011 11:24:13 -0400 Message-ID: <16597.1305213853@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/109 X-Sequence-Number: 30248 "Panos Christeas" writes: > CREATE TABLE test1( > id SERIAL PRIMARY KEY, > name VARCHAR(20) NOT NULL > ); > CREATE TABLE test2( > description TEXT > ) INHERITS(test1); > ALTER TABLE test2 ALTER name DROP NOT NULL; > pg_dump that. > The dump will still have "not null" constraint at test2.name. This isn't really a pg_dump deficiency. The bug is that we let you do that ALTER. Inherited constraints shouldn't be droppable, and indeed are not droppable except in the single case of NOT NULL. This is on the to-fix list --- in fact there was a patch submitted for it last year, although it got returned for rework and we've not seen it again yet. regards, tom lane