DEV Community

Discussion on: managing db users in postgres & mysql

Collapse
 
dmfay profile image
Dian Fay

A couple of Postgres points:

3. Checking privileges

psql's \z is a convenient shorthand for listing database object permissions.

5. DROP USER

It sounds like you're looking for REASSIGN OWNED BY $user-to-delete TO $another-user; which will handle any dependencies for you and give you a clear path to dropping the user. Don't just drop owned objects unless you're in a sandbox -- it's hard to get those back!

Collapse
 
intricatecloud profile image
Danny Perez

I've updated the post - thanks for the feedback!