Skip to content

Instantly share code, notes, and snippets.

@thm1118
Last active June 8, 2018 19:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thm1118/9320610 to your computer and use it in GitHub Desktop.
Save thm1118/9320610 to your computer and use it in GitHub Desktop.
bulk alter role of postgreSQL's database or table or view .etc
REASSIGN OWNED BY old_role [, ...] TO new_role
@RafaAguilar
Copy link

If your are applying it to multiple database which has multiple schemas with multiple objects, where all the named could have different owners :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment