re: managing db users in postgres & mysql VIEW POST

FULL DISCUSSION
 

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!

 

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

code of conduct - report abuse