Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /pg/bin/createdb -U postgres -T tempdb
- /pg/bin/psql -U postgres tempdb -c "drop schema public cascade;"
- /pg/bin/pg_dump -s -n public -U postgres maindb > publicschemadump
- /pg/bin/psql -U postgres tempdb < publicschemadump
- /pg/bin/psql -U postgres temdb -c "Alter schema public rename to thepublicschemastructure;"
- /pg/bin/pg_dump -s -n thepublicschemastructure -U postgres tempdb > thepublicschemastructuredump
- /pg/bin/psql -U postgres maindb < thepublicschemastructuredump
- /pg/bin/psql -U postgres maindb -c "Alter schema thepublicschemastructure rename to Somenewuserschema"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement