pg_restore schema dump to schema with different name

From: Nagaraj Raj <nagaraj(dot)sf(at)yahoo(dot)com>
To: Pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: pg_restore schema dump to schema with different name
Date: 2021-08-23 09:44:07
Message-ID: 2083887101.547666.1629711847197@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,
I know I can alter schema name after restoring but the problem is the name already exist and I don't want to touch that existing schema.The dump type is "custom".

So effectively I want something like.pg_dump -U postgres --schema "source_schema" --format "c" --create --file "source_schema.bak" my_dbpg_restore -U postgres --exit-on-error --dbname "my_db"  --destination-schema "destination_schema"  
Currently this is not something can do. this functionality is there in oracle. 

Is this future considering to add?  (it would really help for create any test schemas without disturbing current schema. )

Thanks,Rj

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2021-08-23 13:19:26 Re: pg_restore schema dump to schema with different name
Previous Message ldh@laurent-hasson.com 2021-08-23 03:22:34 RE: Big Performance drop of Exceptions in UDFs between V11.2 and 13.4