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>
Re: BUG #16374: I can't directly change owner from my created database to my created user. Tom Lane <tgl@sss.pgh.pa.us>
PG Bug reporting form  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
Дата:
От: Jehan-Guillaume de Rorthais
Дата:
FAQ