Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKTEb-0000no-3a for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Sep 2020 21:20:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kKTEa-0000Y1-1x for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Sep 2020 21:20:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKTEZ-0000Xm-Sg for pgsql-bugs@lists.postgresql.org; Mon, 21 Sep 2020 21:20:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKTEX-00010I-7l for pgsql-bugs@lists.postgresql.org; Mon, 21 Sep 2020 21:20:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 08LLKMNt1040808; Mon, 21 Sep 2020 17:20:22 -0400 From: Tom Lane To: Daniel Gustafsson cc: andrewbille@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #16622: pg_dump produces erroneus ALTER TABLE statement for a table with an inherited generated column In-reply-to: <3B0AA616-F9E9-40F4-9350-2F82E6E88BC9@yesql.se> References: <16622-779a79851b4e2491@postgresql.org> <3B0AA616-F9E9-40F4-9350-2F82E6E88BC9@yesql.se> Comments: In-reply-to Daniel Gustafsson message dated "Fri, 18 Sep 2020 11:38:15 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1040806.1600723222.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 21 Sep 2020 17:20:22 -0400 Message-ID: <1040807.1600723222@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Daniel Gustafsson writes: >> On 18 Sep 2020, at 06:58, PG Bug reporting form wrote: >> psql:dump.sql:50: ERROR: column "b" of relation "gtest1_1" is a genera= ted >> column > I can reproduce this in git HEAD too. Yeah, this has been complained of before, notably at [1]. The latest patch in that thread is Masahiko-san's at [2], which is similar to but not exactly like yours. Could you review/test that one? (I suspect you are right that binary-upgrade is a special case, but wouldn't the existing pg_upgrade test catch that? Also, do we need more test cases?) regards, tom lane [1] https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.= pa.us [2] https://www.postgresql.org/message-id/CA%2Bfd4k6pLzrZDQsdsxcS06AwGRf1D= gwOw84sFq9oXNw%2B83nB1g%40mail.gmail.com