Re: Completely replacing an old user

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Completely replacing an old user
Дата
Msg-id 495059484.82333.1694896650450@office.mailbox.org
обсуждение исходный текст
Ответ на Completely replacing an old user  (Koen De Groote <kdg.dev@gmail.com>)
Список pgsql-admin
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



В списке pgsql-admin по дате отправления:

Предыдущее
От: Koen De Groote
Дата:
Сообщение: Completely replacing an old user
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Completely replacing an old user