Re: BUG #14631: Allow pg_restore to remap schema

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: cinbau(at)warpmail(dot)net
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14631: Allow pg_restore to remap schema
Date: 2017-04-25 00:02:27
Message-ID: CAB7nPqQDNHuQCJr_K=CAQY363bOCqUSnDfbnZxwgi3OTiwUJPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Apr 25, 2017 at 7:20 AM, <cinbau(at)warpmail(dot)net> wrote:
> When using pg_dump with the data only and compressed options (-a -Fc), it
> would be useful to allow pg_restore to restore the data to the same table,
> but in a different schema. Oracle's data pump allows remapping of both
> schemas and tablespaces (e.g. remap_schema=schema1:schema1).

Please note that this is not a bug, so this had better be discussed on
a mailing list with a more general purpose like pgsql-general. At the
end this is not much different than renaming the schema or tablespace
after doing a restore, assuming that the target node does not have a
schema with the same name as the dump, still you could always rename
as well temporarily any existing schema on the target server.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-04-25 01:53:39 Re: Concurrent ALTER SEQUENCE RESTART Regression
Previous Message cinbau 2017-04-24 22:20:01 BUG #14631: Allow pg_restore to remap schema