> 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