Copy entire schema A to a different schema B

From: Tiffany Thang <tiffanythang(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Copy entire schema A to a different schema B
Date: 2019-02-11 16:00:37
Message-ID: CAB_W-NMjRS4ah_txcF=pZmYA_KfZLm+mT5eL26-az+xTHEdXcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Thank.

Tiff

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-02-11 16:07:45 Re: Copy entire schema A to a different schema B
Previous Message Martín Fernández 2019-02-11 14:59:27 Re: Promote replica before being able to accept connections