On Tuesday, February 4, 2025, Ayush Vatsa <ayushvatsa1...@gmail.com> wrote:
>
> postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA my_schema REVOKE EXECUTE ON
> FUNCTIONS FROM PUBLIC;
> ALTER DEFAULT PRIVILEGES
>

As the documentation explains:

Default privileges that are specified per-schema are added to whatever the
global default privileges are for the particular object type. This means
you cannot revoke privileges per-schema if they are granted globally
(either by default, or according to a previous ALTER DEFAULT PRIVILEGES command
that did not specify a schema). Per-schema REVOKE is only useful to reverse
the effects of a previous per-schema GRANT.


David J.

Reply via email to