Re: SQL command : ALTER DATABASE OWNER TO

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: SQL command : ALTER DATABASE OWNER TO
Дата
Msg-id EC6A3402-8271-4EA7-B6BA-1CEFEA96C749@yesql.se
обсуждение исходный текст
Ответ на Re: SQL command : ALTER DATABASE OWNER TO  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: SQL command : ALTER DATABASE OWNER TO  (gparc@free.fr)
Re: SQL command : ALTER DATABASE OWNER TO  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-docs
> On 24 Jan 2024, at 15:23, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> On Wed, 2024-01-24 at 11:08 +0100, gparc@free.fr wrote:
>> for this "ALTER DATABASE" form, it should be mentioned that after execution of the command,
>> the old database owner loses all his privileges on it (even connection) although it might
>> still owns schemas or objects (tables, index,...) inside it.
>>
>> Thanks in advance to add this important precision.
>
> How about this:
>
> diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
> index 4044f0908f..44042f863c 100644
> --- a/doc/src/sgml/ddl.sgml
> +++ b/doc/src/sgml/ddl.sgml
> @@ -1891,6 +1891,8 @@ ALTER TABLE <replaceable>table_name</replaceable> OWNER TO <replaceable>new_owne
>    Superusers can always do this; ordinary roles can only do it if they are
>    both the current owner of the object (or inherit the privileges of the
>    owning role) and able to <literal>SET ROLE</literal> to the new owning role.
> +   All object privileges of the old owner are transferred to the new owner
> +   along with the ownership.
>   </para>

Doesn't seem unreasonable to me, it won't make the docs harder to read and use
for experienced users while it may make them easier to follow for new users.

--
Daniel Gustafsson




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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: SQL command : ALTER DATABASE OWNER TO
Следующее
От: Laurenz Albe
Дата:
Сообщение: Spam complaint