From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Copy entire schema A to a different schema B
Date: Mon, 11 Feb 2019 10:10:48 -0600
Message-ID: <9aa9cb06-8bca-910c-5251-d974849dda7c@gmail.com> (raw)
In-Reply-To: <CAB_W-NMjRS4ah_txcF=pZmYA_KfZLm+mT5eL26-az+xTHEdXcA@mail.gmail.com>
References: <CAB_W-NMjRS4ah_txcF=pZmYA_KfZLm+mT5eL26-az+xTHEdXcA@mail.gmail.com>
On 2/11/19 10:00 AM, Tiffany Thang wrote:
> Hi,
> To copy the source schema A to target schema B in the same database in
> PG10.3, I use psql to dump schema A and manually removes anything specific
> to the schema in the text dump file before importing into schema B. How do
> I achieve the same exporting from Schema A and importing into schema B
> using pg_dump with the -Fc option? Since the dump file generated is
> binary, I could not make modifications to the file. Is the procedure the
> same in version 11?
Why do you need to use "--format=custom" instead of "--format=plain"?
For example:
$ pg_dump --format=plain --schema-only --schema=A
--
Angular momentum makes the world go 'round.
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: ronljohnsonjr@gmail.com
Subject: Re: Copy entire schema A to a different schema B
In-Reply-To: <9aa9cb06-8bca-910c-5251-d974849dda7c@gmail.com>
References: <CAB_W-NMjRS4ah_txcF=pZmYA_KfZLm+mT5eL26-az+xTHEdXcA@mail.gmail.com> <9aa9cb06-8bca-910c-5251-d974849dda7c@gmail.com>
* 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