SHARE
TWEET

Untitled

a guest May 6th, 2010 396 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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"
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. OK, I Understand
 
Top