Created
December 14, 2012 23:51
-
-
Save kellyredding/4289686 to your computer and use it in GitHub Desktop.
Mass-modify owner roles for an entire db in Postgres. I used this when changing a db user an app uses to access its data.
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
REASSIGN OWNED BY old_role [, ...] TO new_role |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(notes to self)
http://stackoverflow.com/a/13535184
http://www.postgresql.org/docs/9.2/static/sql-reassign-owned.html