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 1jL7Ag-0002Fb-L4 for pgsql-bugs@arkaria.postgresql.org; Sun, 05 Apr 2020 15:26:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jL7Af-0008Ki-Hf for pgsql-bugs@arkaria.postgresql.org; Sun, 05 Apr 2020 15:26:49 +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 1jL7Af-0008K2-BP for pgsql-bugs@lists.postgresql.org; Sun, 05 Apr 2020 15:26:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL7AZ-0004db-1l for pgsql-bugs@lists.postgresql.org; Sun, 05 Apr 2020 15:26:48 +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 035FQaOd010838; Sun, 5 Apr 2020 11:26:36 -0400 From: Tom Lane To: Peter Eisentraut cc: ewaldo@healthetechs.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16342: CREATE TABLE LIKE INCLUDING GENERATED column order issue In-reply-to: References: <16342-50008a509308f4ca@postgresql.org> Comments: In-reply-to Peter Eisentraut message dated "Sun, 05 Apr 2020 13:28:20 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10836.1586100396.1@sss.pgh.pa.us> Date: Sun, 05 Apr 2020 11:26:36 -0400 Message-ID: <10837.1586100396@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > Confirmed. Attached is a patch to fix it. Thanks for the report! LGTM. Perhaps extend the comment block just above, adding something like "We must fill the attmap now so it can be used to process GENERATED default expressions in the per-column loop." regards, tom lane