postgresql - I want to restore the database with a different schema -
dear ,
have taken dump of database named temp1
using follwing command
$ pg_dump -i -h localhost -u postgres -f c -b -v -f pub.backup temp1
now want restore dump in different database called "db_temp" , in want tables should created in "temp_schema" ( not default schema in fms temp1 database ) in "db_temp" database.
is there way using pg_restore command
other method appreciated !
in advance!
there's no way in pg_restore itself. can use pg_restore generate sql output, , send through example sed script change it. need careful how write sed script though, doesn't match , change things inside data.
Comments
Post a Comment