Re: pg_dump insert column GENERATED

From: Дмитрий Иванов <firstdismay(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_dump insert column GENERATED
Date: 2021-11-21 15:23:12
Message-ID: CAPL5KHobYgdgLj0E0ppUp1Y7MDf9QQX2V+hb7uxKM6E-TWKJsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes and yes.
I don't get regular results in my experiments. I filled in some of the
tables this morning, but now I can't do it again.
> INSERT INTO bpd.plan_calendar (create in version 12)
> OK
I can't do it again.

>If I am following the bpg.object table was originally created in
>Postgres 10, correct?
Yes

bpd.plan_calendar was created in the Postgres 12 instance of the
database with GENERATED ALWAYS AS, correct?
Yes

>Postgres 10 did not have GENERATED ALWAYS AS, that appeared in Postgres 12.
>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.

>Means was the instance the standby in a replication setup that was then
>moved up(promoted) to the primary.

wal_level = replica # minimal, replica, or logical
Never been in a replication relationship.

Are the below from the bpd.sql file?
Yes
Why does pg_dump insert data into the calculated columns?
I entered the data manually via export/import, excluding the problematic
field because its value will be calculated when inserted.

>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Дмитрий Иванов 2021-11-21 15:30:16 Re: pg_restore depending on user functions
Previous Message Adrian Klaver 2021-11-21 05:31:38 Re: pg_dump insert column GENERATED