From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Дмитрий Иванов <firstdismay@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: pg_dump insert column GENERATED
Date: Sat, 20 Nov 2021 12:33:04 -0500
Message-ID: <3177295.1637429584@sss.pgh.pa.us> (raw)
In-Reply-To: <d0d559a9-f5f8-dcb6-673c-edeb64f6cf65@aklaver.com>
References: <CAPL5KHrkBniyQt5e1rafm5DdXvbgiiqfEQEJ9GjtVzN71Jj5pA@mail.gmail.com>
<d0d559a9-f5f8-dcb6-673c-edeb64f6cf65@aklaver.com>
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 11/20/21 04:27, Дмитрий Иванов 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", on_freeze, timestamp_class, name, id_class_root, id_group, id_group_root, id_object_carrier, "desc", id_class_prop_object_carrier, id_pos_temp_prop, is_inside, mc) VALUES (51253, 1015, 461, 1, 461, 84, 2020000512530, 14, '2021-11-14 08:40:31.381', false, '2021-02-19 11:01:28.402', 'NFC метка самоклеющаяся', 1013, 138, 138, -1, '', -1, -1, DEFAULT, 1);
I wonder what version of pg_dump is actually being used there.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, firstdismay@gmail.com
Subject: Re: pg_dump insert column GENERATED
In-Reply-To: <3177295.1637429584@sss.pgh.pa.us>
References: <CAPL5KHrkBniyQt5e1rafm5DdXvbgiiqfEQEJ9GjtVzN71Jj5pA@mail.gmail.com> <d0d559a9-f5f8-dcb6-673c-edeb64f6cf65@aklaver.com> <3177295.1637429584@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox