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 1moUFJ-0005MQ-3H for pgsql-general@arkaria.postgresql.org; Sat, 20 Nov 2021 17:33:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1moUEm-0000Fv-28 for pgsql-general@arkaria.postgresql.org; Sat, 20 Nov 2021 17:33:16 +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 1moUEl-0000FW-NS for pgsql-general@lists.postgresql.org; Sat, 20 Nov 2021 17:33:15 +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 1moUEe-0004lC-Rb for pgsql-general@lists.postgresql.org; Sat, 20 Nov 2021 17:33:14 +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 1AKHX4K93177296; Sat, 20 Nov 2021 12:33:04 -0500 From: Tom Lane To: Adrian Klaver cc: =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= , pgsql-general Subject: Re: pg_dump insert column GENERATED In-reply-to: References: Comments: In-reply-to Adrian Klaver message dated "Sat, 20 Nov 2021 09:00:38 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3177294.1637429583.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 20 Nov 2021 12:33:04 -0500 Message-ID: <3177295.1637429584@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Adrian Klaver writes: > On 11/20/21 04:27, =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9 =D0=98=D0=B2= =D0=B0=D0=BD=D0=BE=D0=B2 wrote: >> Why does pg_dump generate an insertion script in the generated columns?= = > Actually I think it should be DEFAULT. It should be, and it is when I try this example. I get output like -- -- Data for Name: object; Type: TABLE DATA; Schema: bpd; Owner: postgres -- INSERT INTO bpd.object (id, id_class, id_position, bquantity, id_position_= root, id_conception, barcode_unit, id_unit_conversion_rule, "timestamp", o= n_freeze, timestamp_class, name, id_class_root, id_group, id_group_root, i= d_object_carrier, "desc", id_class_prop_object_carrier, id_pos_temp_prop, = is_inside, mc) VALUES (51253, 1015, 461, 1, 461, 84, 2020000512530, 14, '2= 021-11-14 08:40:31.381', false, '2021-02-19 11:01:28.402', 'NFC =D0=BC=D0=B5= =D1=82=D0=BA=D0=B0 =D1=81=D0=B0=D0=BC=D0=BE=D0=BA=D0=BB=D0=B5=D1=8E=D1=89=D0= =B0=D1=8F=D1=81=D1=8F', 1013, 138, 138, -1, '', -1, -1, DEFAULT, 1); I wonder what version of pg_dump is actually being used there. regards, tom lane