Re: BUG #16374: I can't directly change owner from my created database to my created user.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16374: I can't directly change owner from my created database to my created user.
Дата
Msg-id 18975.1587130176@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16374: I can't directly change owner from my created database to my created user.  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
>> **postgres=> alter database db1 owner to user1;**
>> **2020-04-17 16:37:04.328 CST [4712] ERROR:  must be member of role
> "user1"**

> However, "user1" is my created, and "db1" is my created too. Why couldn't I
> chenge owner of "db1" to "user1" directly?

Like it says, you're not a member of role user1.  Since you have
createrole privilege, you could make yourself a member:

regression=> grant user1 to root;
GRANT ROLE

and then it'd work.  But you didn't.  (This is one of the ways that
createrole is less powerful, and less dangerous, than superuser.)

            regards, tom lane



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16374: I can't directly change owner from my created database to my created user.
Следующее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: [BUG] non archived WAL removed during production crash recovery