Re: Completely replacing an old user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/09/2023 20:27 CEST Koen De Groote <kdg.dev@xxxxxxxxx> 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





[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux