On 16/09/2023 20:27 CEST Koen De Groote <kdg.dev@gmail.com> wrote:
> I am trying to set up a new user for a client application, and thus want to
> remove the old user afterward.
>
> But I'm getting stuck on one last error message:
>
> ERROR: role "X" cannot be dropped because some objects depend on it
> DETAIL: privileges for default privileges on new functions belonging to
> role postgres in schema public
You must also revoke its default privileges before you can drop a role.
That's mentioned in the notes of ALTER DEFAULT PRIVILEGES [1].
> The "new functions" bit is confusing. I've swapped over all the current
> functions, but cannot seem to find the appropriate table for privileges on
> new functions.
psql command \ddp will show you the default privileges.
[1] https://www.postgresql.org/docs/16/sql-alterdefaultprivileges.html#SQL-ALTERDEFAULTPRIVILEGES-NOTES
--
Erik