I was trying to delete PostgreSQL user:
DROP USER ryan;
I received this error:
Error in query: ERROR: role "ryan" cannot be dropped because some objects depend on it DETAIL: privileges for database mydatabase
I looked for a solution from these threads:
- PostgreSQL - how to quickly drop a user with existing privileges
- How to drop user in postgres if it has depending objects
Still have the same error.
This happens after I grant all permission to user "ryan" with:
GRANT ALL PRIVILEGES ON DATABASE mydatabase ON SCHEMA public TO ryan;