Re: SQL command : ALTER DATABASE OWNER TO

Поиск
Список
Период
Сортировка
Искать
От
Laurenz Albe
Тема
Re: SQL command : ALTER DATABASE OWNER TO
Дата
Msg-id
bd4c8b8e88548d6e08220196a02c17d4fa5d2124.camel@cybertec.at
Ответ на
Список
Дерево обсуждения
Re: SQL command : ALTER DATABASE OWNER TO Laurenz Albe <laurenz.albe@cybertec.at>
Re: SQL command : ALTER DATABASE OWNER TO Josef Šimánek <josef.simanek@gmail.com>
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 table_name OWNER TO 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 SET ROLE to the new owning role.
+   All object privileges of the old owner are transferred to the new owner
+   along with the ownership.
   
 
   

Yours,
Laurenz Albe


В списке pgsql-docs по дате отправления
От: gparc@free.fr
Дата:
От: Daniel Gustafsson
Дата:
FAQ