Advertisement
Guest User

Untitled

a guest
May 6th, 2010
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. /pg/bin/createdb -U postgres -T tempdb
  2. /pg/bin/psql -U postgres tempdb -c "drop schema public cascade;"
  3. /pg/bin/pg_dump -s -n public -U postgres maindb > publicschemadump
  4. /pg/bin/psql -U postgres tempdb < publicschemadump
  5. /pg/bin/psql -U postgres temdb -c "Alter schema public rename to thepublicschemastructure;"
  6. /pg/bin/pg_dump -s -n thepublicschemastructure -U postgres tempdb > thepublicschemastructuredump
  7. /pg/bin/psql -U postgres maindb < thepublicschemastructuredump
  8. /pg/bin/psql -U postgres maindb -c "Alter schema thepublicschemastructure rename to Somenewuserschema"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement