kastielspb

Change tables owner

Feb 19th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.17 KB | None | 0 0
  1. for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" {{db_name}}` ; do  psql -c "alter table $tbl owner to {{user_name}}" {{db_name}} ; done
Add Comment
Please, Sign In to add comment