Created
April 14, 2014 14:41
-
-
Save kayluhb/10654255 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg_dump --no-privileges --no-owner database_name > database_name.sql | |
psql -e -U root -d zoomin -f database_name.sql | |
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" database_name` ; do psql -c "alter table $tbl owner to root" database_name; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment