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-22 16:42:55
Message-ID: CAPL5KHqope+fNPhX+weneJH6wfZ9cOQJH-rmPcgXEyy+6PRH1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you, there is a clear logic to it.
--
Regards, Dmitry!

пн, 22 нояб. 2021 г. в 21:11, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>:

> On 11/22/21 03:32, Дмитрий Иванов wrote:
> > Got it.
> >
> >
> > >You are going need to provide more information about the above:
> > >1) Define regular results.
> > >2) The query used.
> > >3) The outcome vs what you expected.
> >
> > I will continue to experiment. The question is which option is better
> > (this would reduce the number of options):
> > pd_dump is the source server;
> > pg_restore - receiver server;
> > or
> > pd_dump - receiver server;
> > pg_restore - server-receiver;
>
> pg_dump is backwards compatible not forwards.
>
> In the explanations below Postgres versioning(major/minor) is determined
> as:
>
> Pre-version 10:
>
> X.x.x
>
> 10+:
>
> X.x
>
> Where X is major and x is minor.
>
> This means if are moving forwards in Postgres major version then:
>
> 1) Use pg_dump from newer version of Postgres to dump from older version
> of Postgres. In your case pg_dump(v14) dump Postgres server v12.
>
> 2) To restore use the version of pg_restore for the Postgres version you
> are restoring to. In your case pg_restore(v14).
>
> Staying on the same version:
>
> 1) Use the pg_dump/pg_restore for the version your are on.
>
> 2) If you are moving from one minor release to another then it would be
> better to use the latest minor release version to get any bug fixes.
>
> Going backwards from newer version to older version:
>
> This is not supported.
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-11-22 16:47:44 Re: insert column monetary type ver 2
Previous Message Adrian Klaver 2021-11-22 16:19:32 Re: insert column monetary type ver 2