Thread: Changing schema name when restoring?

Changing schema name when restoring?

From
"Don O'Hara"
Date:
I don't see anything in the documentation for pg_restore, but was curious if there is any way to restore to a schema name that is different from what it was unloaded from. I.E. I'd like to generate a TOC list using pg_restore and edit the schema name in that. 

Generating plain text output and editing the file is not an option due to dataset size.

I have been restoring to the same schema name, then renaming the schema, but was looking if there are other ways to do it. 

Re: Changing schema name when restoring?

From
Guillaume Lelarge
Date:
2016-03-03 19:41 GMT+01:00 Don O'Hara <don.ohara@gmail.com>:
I don't see anything in the documentation for pg_restore, but was curious if there is any way to restore to a schema name that is different from what it was unloaded from. I.E. I'd like to generate a TOC list using pg_restore and edit the schema name in that. 

Generating plain text output and editing the file is not an option due to dataset size.

I have been restoring to the same schema name, then renaming the schema, but was looking if there are other ways to do it. 

Nope, no nicer way.


--