Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hzSUR-0000QL-11 for pgsql-bugs@arkaria.postgresql.org; Sun, 18 Aug 2019 21:13:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hzSUP-0006xw-Tf for pgsql-bugs@arkaria.postgresql.org; Sun, 18 Aug 2019 21:13:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hzSUP-0006wA-Kn for pgsql-bugs@lists.postgresql.org; Sun, 18 Aug 2019 21:13:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hzSUO-0006SF-A6 for pgsql-bugs@lists.postgresql.org; Sun, 18 Aug 2019 21:13:25 +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 x7ILDKl6000620; Sun, 18 Aug 2019 17:13:20 -0400 From: Tom Lane To: Manuel Rigger cc: PostgreSQL mailing lists Subject: Re: Multiple inheritance and ALTER TABLE issue In-reply-to: <31561.1564246401@sss.pgh.pa.us> References: <31561.1564246401@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 27 Jul 2019 12:53:21 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <618.1566162800.1@sss.pgh.pa.us> Date: Sun, 18 Aug 2019 17:13:20 -0400 Message-ID: <619.1566162800@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Manuel Rigger writes: >> Consider the test case below: >> CREATE TABLE t0(c0 boolean); >> CREATE TABLE t1(c0 boolean); >> CREATE TABLE t2(c0 boolean) INHERITS(t0, t1); >> ALTER TABLE t0 ALTER c0 TYPE TEXT; >> UPDATE t1 SET c0 = TRUE; -- ERROR: attribute "c0" of relation "t2" >> does not match parent's type >> Is this behavior intended? > Hm. I would say that the ALTER COLUMN TYPE operation should have thrown > an error instead of trying to change the type of a multiply-inherited > column. As you say, no good can come of that. I've pushed a fix along that line. Thanks for the report! regards, tom lane