Created
December 4, 2018 23:13
-
-
Save xarimanx/bfaa9df43f524a2d16255148c6c1d1ff to your computer and use it in GitHub Desktop.
change owner of tables
This file contains 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
$ for table in `psql -tc "select tablename from pg_tables where schemaname = '${SCHEMA}';" ${DB}` ; do psql -c "alter table ${SCHEMA}.${table} owner to ${OWNER}" ${DB} ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment