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 1kNImD-0006RF-5C for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Sep 2020 16:46:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kNImC-0002Fm-3U for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Sep 2020 16:46:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNImB-0002FU-T9 for pgsql-hackers@lists.postgresql.org; Tue, 29 Sep 2020 16:46:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNIm8-0000pL-RI for pgsql-hackers@lists.postgresql.org; Tue, 29 Sep 2020 16:46:50 +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 08TGkkCR661372; Tue, 29 Sep 2020 12:46:46 -0400 From: Tom Lane To: Peter Eisentraut cc: Masahiko Sawada , Daniel Gustafsson , andrewbille@gmail.com, PostgreSQL Hackers Subject: Re: Dumping/restoring fails on inherited generated column In-reply-to: <660925.1601397436@sss.pgh.pa.us> References: <15830.1575468847@sss.pgh.pa.us> <31905.1575491779@sss.pgh.pa.us> <24369.1580758361@sss.pgh.pa.us> <3f272982-0e0d-17a1-3fb6-fedc74197676@2ndquadrant.com> <3169466.1594841366@sss.pgh.pa.us> <660925.1601397436@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 29 Sep 2020 12:37:16 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <661370.1601398006.1@sss.pgh.pa.us> Date: Tue, 29 Sep 2020 12:46:46 -0400 Message-ID: <661371.1601398006@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > The situation is different for GENERATED columns, since we disallow > a child having a different GENERATED property than the parent. BTW, that alleged prohibition is pretty damn leaky: d3=# create table pp1 (a int, b int GENERATED ALWAYS AS (a * 2) STORED); CREATE TABLE d3=# create table cc1 (a int, b int GENERATED ALWAYS AS (a * 3) STORED); CREATE TABLE d3=# alter table cc1 inherit pp1; ALTER TABLE Maybe the *real* fix here is to give up on this idea that they can't be different? regards, tom lane