Re: SQL command : ALTER DATABASE OWNER TO

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: SQL command : ALTER DATABASE OWNER TO
Дата
Msg-id cbf04b89a1bb488ff7ed2f9914e064b4332ec002.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: SQL command : ALTER DATABASE OWNER TO  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: SQL command : ALTER DATABASE OWNER TO
Список pgsql-docs
On Wed, 2024-01-24 at 08:47 -0700, David G. Johnston wrote:
> I dislike this change, ownership of an object is completely independent of
> the grant system of privileges.  The granted privileges of the old row do
> not transfer to the new owner when alter ... owner to is executed. 

CREATE TABLE mytab ();

REVOKE ALL ON mytab FROM PUBLIC;

\z mytab
                                 Access privileges
 Schema │ Name  │ Type  │     Access privileges     │ Column privileges │ Policies
════════╪═══════╪═══════╪═══════════════════════════╪═══════════════════╪══════════
 public │ mytab │ table │ postgres=arwdDxt/postgres │                   │
(1 row)

ALTER TABLE mytab OWNER TO laurenz;

\z mytab
                                Access privileges
 Schema │ Name  │ Type  │    Access privileges    │ Column privileges │ Policies
════════╪═══════╪═══════╪═════════════════════════╪═══════════════════╪══════════
 public │ mytab │ table │ laurenz=arwdDxt/laurenz │                   │
(1 row)

Yours,
Laurenz Albe

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: SQL command : ALTER DATABASE OWNER TO
Следующее
От: gparc@free.fr
Дата:
Сообщение: Re: SQL command : ALTER DATABASE OWNER TO