Re: Not able to grant role to User.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Not able to grant role to User.
Дата
Msg-id 2311581.1698639066@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Not able to grant role to User.  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Sun, 2023-10-29 at 20:40 +0530, Gambhir Singh wrote:
>> Error: Exception: must have admin option role "application_role"

> This is not a PostgreSQL error message.

It could be a sloppily transcribed version of our pre-v16 message:

        if (!have_createrole_privilege() &&
            !is_admin_of_role(grantorId, roleid))
            ereport(ERROR,
                    (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
                     errmsg("must have admin option on role \"%s\"",
                            rolename)));

If that's what it is though, any effort at reading the documentation
would have turned up the relevant point: the would-be grantor needs
to have been granted the role WITH ADMIN OPTION in order to be able
to grant it to (or revoke it from) someone else.  Or else be
superuser or someone with CREATEROLE.

            regards, tom lane



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Not able to grant role to User.
Следующее
От: SOzcn
Дата:
Сообщение: Re: On Replica - History issue