remapping schema names with pg_restore? - Mailing list pgsql-admin

From S.Bob
Subject remapping schema names with pg_restore?
Date
Msg-id 2f0ee65d-acbc-4d4a-eea0-63825d024e5d@quadratum-braccas.com
Whole thread Raw
Responses Re: remapping schema names with pg_restore?  (Pavan Teja <pavan.postgresdba@gmail.com>)
List pgsql-admin

Hi All;


Is it possible to re-map / rename schemas when doing a schema based restore from a custom formatted dump file. I have a dump I created like this:


pg_dump  -Fc  --schema=prod_test  prod_db   >   prod_db.dmp

I want to restore  it into another cluster, into a db named integ_db but I want the schema in the restored db to be named integ_test instead of prod_test


Is there a way  to do this at  pg_restore time? without loading into a schema named prod_test and renaming the schema after the restore?


Thanks in advance



pgsql-admin by date:

Previous
From: Dipanjan Ganguly
Date:
Subject: Connections dropping while using Postgres backend DB with Ejabberd
Next
From: Venkat jumbo
Date:
Subject: Change password