Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. REVOKE ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public FROM asd;
  2. REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM asd;
  3.  
  4. -- logged in as the rds_superuser role you defined when you created your RDS instance
  5. CREATE ROLE change_owner LOGIN;
  6. GRANT asd TO change_owner;
  7. GRANT foo_migration TO change_owner;
  8.  
  9. -- log out of current user and log in as `change_owner`
  10. REASSIGN OWNED BY asd TO foo_migration;
  11.  
  12. -- log out of current user and log in as rds_superuser role
  13. DROP USER asd;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement