Search Postgresql Archives

Re: unable to restore. pg_restore: implied data-only restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Uckun <timuckun@xxxxxxxxx> writes:
> I am trying to backup one database and restore it into a new schema in
> another database. Database1 has the tables in the public schema
> database2 has some tables in the public schema but their names will
> clash so the database needs to be stored in a different schema.

There is no support for that built into pg_dump.  You could try:

* dumping to a text script and doing search-and-replace for the schema
name on the script file.

* temporarily renaming the target database's public schema out of the
way, then renaming after the restore.

* doing the schema rename on the source database before you dump.

			regards, tom lane

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux