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 1iygvy-0000VG-Io for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2020 18:58:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iygvx-00052D-Cm for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Feb 2020 18:58:57 +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 1iygvw-00051M-F5 for pgsql-hackers@lists.postgresql.org; Mon, 03 Feb 2020 18:58:57 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iygvs-0002zj-Dg for pgsql-hackers@lists.postgresql.org; Mon, 03 Feb 2020 18:58:56 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 6D63D85A; Mon, 3 Feb 2020 13:58:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 03 Feb 2020 13:58:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Keto8G 8A3J5oRk5wyNk95jOhkdUhEEOqgDeXqgIgdBA=; b=K6C7O6VNbcrhJyDMDGWnV1 HrtU70gOxP7XZjvEIinzjDNxH2kN0dBuI5sigMPSJGpMehf8w++Ny34hWNfvK1mN pKzEtxdyuFjy17H0cwvh+Ztw8FRQTj9dKEGlx5SKIRZN+gWkz5pgh/WX9/xJjiGq CpHVvycklgFmivBuFNgkTOwlAmzrMeDsB1kv9xjE8T3nDmTKlakObRBsShtXDGAh tvV0DCUm9SnWPDiv4+1bBIUbc937CbSApJkuAMjY6QDFAhLF6Tp+4PSW+FfB+OnN sR7gvTjIBghLQQXBR662m4mrYQQrwB9ScBcHneiDgUTftEcWx7QUEhsPfxnE8SLw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrgeejgdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhfhokffffgggjggtsehmtd erredtfeejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghr rdgvihhsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomheqnecuffhomhgrih hnpedvnhguqhhurggurhgrnhhtrdgtohhmnecukfhppeelfedrvdegvddrvdehhedruddu vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvg htvghrrdgvihhsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df2ff70.dip0.t-ipconnect.de [93.242.255.112]) by mail.messagingengine.com (Postfix) with ESMTPA id 2E2F03280064; Mon, 3 Feb 2020 13:58:45 -0500 (EST) Subject: Re: Dumping/restoring fails on inherited generated column To: Tom Lane References: <15830.1575468847@sss.pgh.pa.us> <31905.1575491779@sss.pgh.pa.us> Cc: pgsql-hackers@lists.postgresql.org From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 3 Feb 2020 19:58:43 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <31905.1575491779@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------9DD9D66ADA6E4214CBAFDB03" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------9DD9D66ADA6E4214CBAFDB03 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2019-12-04 21:36, Tom Lane wrote: > I wonder if the right fix is to not generate a DO_ATTRDEF > object at all for generated columns in child tables. Am > I right in guessing that we propagate generated-ness to > child tables automatically? Right. New patch using that approach attached. (Could use more extensive comments.) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --------------9DD9D66ADA6E4214CBAFDB03 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="v2-0001-Fix-dumping-of-inherited-generated-columns.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="v2-0001-Fix-dumping-of-inherited-generated-columns.patch" RnJvbSBlZWVhYjk1YWRjYWEyOTg4NTFhYmQzZmQ0NGQ4NjQ2NTEwZTdhZWQyIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQZXRlciBFaXNlbnRyYXV0IDxwZXRlckBlaXNlbnRy YXV0Lm9yZz4KRGF0ZTogTW9uLCAzIEZlYiAyMDIwIDE5OjU2OjM0ICswMTAwClN1YmplY3Q6 IFtQQVRDSCB2Ml0gRml4IGR1bXBpbmcgb2YgaW5oZXJpdGVkIGdlbmVyYXRlZCBjb2x1bW5z CgotLS0KIHNyYy9iaW4vcGdfZHVtcC9wZ19kdW1wLmMgfCA3ICsrKysrKysKIDEgZmlsZSBj aGFuZ2VkLCA3IGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9zcmMvYmluL3BnX2R1bXAv cGdfZHVtcC5jIGIvc3JjL2Jpbi9wZ19kdW1wL3BnX2R1bXAuYwppbmRleCAzM2U1OGZhMjg3 Li5jOTkzODMyM2IxIDEwMDY0NA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