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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Uckun <timuckun(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: unable to restore. pg_restore: implied data-only restore
Date: 2011-05-25 01:59:23
Message-ID: 23675.1306288763@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tim Uckun <timuckun(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2011-05-25 02:05:13 Re: unable to restore. pg_restore: implied data-only restore
Previous Message Scott Marlowe 2011-05-25 01:09:16 Re: Preventing OOM kills