Re: How to remove user specific grant and revoke

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: How to remove user specific grant and revoke
Дата
Msg-id 1408288797.797459.1685797672449@office.mailbox.org
обсуждение исходный текст
Ответ на Re: How to remove user specific grant and revoke  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: How to remove user specific grant and revoke
Список pgsql-general
> On 03/06/2023 14:46 CEST Erik Wienhold <ewie@ewie.name> wrote:
>
> > On 03/06/2023 09:16 CEST Andrus <kobruleht2@hot.ee> wrote:
> >
> > DROP REVOKE ALL ON TABLE public.kaspriv FROM all EXCEPT public;
> > DROP GRANT SELECT ON TABLE public.kaspriv FROM all EXCEPT public;
> >
> > This will be one-time action. It can be done manually in pgadmin or using
> > some script running once.
>
> Automate this with aclexplode[0] to get the privileges for specific grantees.
> Loop over the result set in a DO block, generate the REVOKE commands, and
> EXECUTE them.
>
>     SELECT acl.grantee::regrole, acl.privilege_type
>     FROM pg_class, aclexplode(relacl) acl
>     WHERE oid = 'public.kaspriv'::regclass;

Or just execute those REVOKE ALL commands (except for PUBLIC) that pgAdmin
already gives you.

--
Erik



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

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: How to remove user specific grant and revoke
Следующее
От: Ron
Дата:
Сообщение: Re: pg_upgrade and schema complexity...