I had a user/role that was a database owner;
- so I dropped first the database;
- I try dropping the user and I get the following error:
role 'user_name' cannot be dropped because some objects depend ot it DETAIL: privileges for schema public
This is very confusing for me;
public is the default schema schema when a database is created.
By dropping the database, shouldn't schema and other objects related to database dropped ? Why this privileges error ?
I want not just a solution to fix it, but also to understand why.
- with \l to be sure the database was droped
- \du to check role attributes(empty)