Re: pg_dump insert column GENERATED

From: Дмитрий Иванов <firstdismay(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_dump insert column GENERATED
Date: 2021-11-22 04:39:23
Message-ID: CAPL5KHo6m8evMZHzrK5QZ3Ct9v2EKOAC8q7OW3-a03TLwntG8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok, I'll take a look.
I recreated the is_inside column yesterday, but it didn't make any
difference.
Uchet=# select attname, attgenerated from pg_attribute
Uchet-# where attrelid = 'bpd.object'::regclass and attnum > 0;
attname | attgenerated
-------------------------------+--------------
id |
id_class |
id_position |
........pg.dropped.4........ |
........pg.dropped.5........ |
........pg.dropped.6........ |
bquantity |
........pg.dropped.8........ |
........pg.dropped.9........ |
id_position_root |
id_conception |
barcode_unit |
id_unit_conversion_rule |
........pg.dropped.14........ |
timestamp |
on_freeze |
timestamp_class |
name |
id_class_root |
id_group |
id_group_root |
id_object_carrier |
desc |
........pg.dropped.24........ |
........pg.dropped.25........ |
........pg.dropped.26........ |
id_class_prop_object_carrier |
id_pos_temp_prop |
........pg.dropped.29........ |
mc |
is_inside | s

вс, 21 нояб. 2021 г. в 21:24, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JjQstCw0L3QvtCy?= <firstdismay(at)gmail(dot)com>
> writes:
> >> So did you do an ALTER TABLE ... GENERATED ALWAYS AS on bpg.object in
> >> the Postgres 12 version of the database?
>
> > I think you're right, I added later.
>
> Hmm, that's suggestive, but I tried making a table that way and still did
> not see any pg_dump misbehavior.
>
> It might be useful to see the results of this query on the v12 server:
>
> select attname, attgenerated from pg_attribute
> where attrelid = 'bpd.object'::regclass and attnum > 0;
>
> We should see attgenerated = 's' for the generated column, but
> maybe we don't?
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2021-11-22 04:39:26 Re: insert column monetary type ver 2
Previous Message Дмитрий Иванов 2021-11-22 04:28:39 Re: insert column monetary type ver 2