Обсуждение: [BUGS] BUG #14631: Allow pg_restore to remap schema

Поиск
Список
Период
Сортировка

[BUGS] BUG #14631: Allow pg_restore to remap schema

От
cinbau@warpmail.net
Дата:
The following bug has been logged on the website:

Bug reference:      14631
Logged by:          Cliff Inbau
Email address:      cinbau@warpmail.net
PostgreSQL version: 9.6.2
Operating system:   CentOS 7
Description:

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).




--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Re: [BUGS] BUG #14631: Allow pg_restore to remap schema

От
Michael Paquier
Дата:
On Tue, Apr 25, 2017 at 7:20 AM,  <cinbau@warpmail.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs