- /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"
SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.