Cannot drop a role that is granted to connect database
问题 I am using PostgreSQL 10.4 and I found a strange behavior. If we create an role and grant it to CONNECT the database: CREATE ROLE dummy; GRANT CONNECT ON DATABASE test TO dummy; Then we cannot drop this role, even if it owns no object at all, this command: DROP ROLE dummy; Raises: ERROR: role "dummy" cannot be dropped because some objects depend on it SQL state: 2BP01 Detail: privileges for database test Documentation is a bit misleading: Class 2B — Dependent Privilege Descriptors Still Exist