for tbl in psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" -h localhost -U postgres -d DATABASE
; do psql -c "alter table "$tbl" owner to ROLE" -h localhost -U postgres -d DATABASE ; done
Created
October 3, 2015 00:17
-
-
Save isccarrasco/124ae8b7d6258ba86d3e to your computer and use it in GitHub Desktop.
Change tables owner for a postgresql schema.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment