From: Jean-Christophe Boggio <postgresql@thefreecat.org>
To: pgsql-performance@lists.postgresql.org
Subject: Re: pg_restore schema dump to schema with different name
Date: Mon, 23 Aug 2021 15:38:44 +0200
Message-ID: <f3d480e2-dbda-83f2-ebbe-2b97e5525e3e@thefreecat.org> (raw)
In-Reply-To: <4a3a3b2569bf521a8da585f3f87c8e56c6d19145.camel@cybertec.at>
References: <2083887101.547666.1629711847197.ref@mail.yahoo.com>
<2083887101.547666.1629711847197@mail.yahoo.com>
<4a3a3b2569bf521a8da585f3f87c8e56c6d19145.camel@cybertec.at>
> The only way to do that is to create a new database, import the data
> there, rename the schema and dump again.
>
> Then import that dump into the target database.
Or maybe (if you can afford to have source_schema unavailable for some
time) :
* rename source_schema to tmp_source
* import (that will re-create source_schema)
* rename source_schema to destination_schema
* rename back tmp_source to source_schema
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: postgresql@thefreecat.org, pgsql-performance@lists.postgresql.org
Subject: Re: pg_restore schema dump to schema with different name
In-Reply-To: <f3d480e2-dbda-83f2-ebbe-2b97e5525e3e@thefreecat.org>
* 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