Extend ALTER DEFAULT PRIVILEGES for large objects

Поиск
Список
Период
Сортировка
От Yugo NAGATA
Тема Extend ALTER DEFAULT PRIVILEGES for large objects
Дата
Msg-id 20240424115242.236b499b2bed5b7a27f7a418@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Extend ALTER DEFAULT PRIVILEGES for large objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Currently, ALTER DEFAULT PRIVILEGE doesn't support large objects,
so if we want to allow users other than the owner to use the large
object, we need to grant a privilege on it every time a large object
is created. One of our clients feels that this is annoying, so I would
like propose to extend  ALTER DEFAULT PRIVILEGE to large objects. 

Here are the new actions allowed in abbreviated_grant_or_revoke;

+GRANT { { SELECT | UPDATE }
+    [, ...] | ALL [ PRIVILEGES ] }
+    ON LARGE OBJECTS
+    TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ]

+REVOKE [ GRANT OPTION FOR ]
+    { { SELECT | UPDATE }
+    [, ...] | ALL [ PRIVILEGES ] }
+    ON LARGE OBJECTS
+    FROM { [ GROUP ] role_name | PUBLIC } [, ...]
+    [ CASCADE | RESTRICT ]

A new keyword OBJECTS is introduced for using plural form in the syntax
as other supported objects. A schema name is not allowed to be specified
for large objects since any large objects don't belong to a schema.

The attached patch is originally proposed by Haruka Takatsuka
and some fixes and tests are made by me. 

Regards,
Yugo Nagata

-- 
Yugo NAGATA <nagata@sraoss.co.jp>

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Streaming I/O, vectored I/O (WIP)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Cleanup: remove unused fields from nodes