Re: Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL - Mailing list pgsql-general

From David G. Johnston
Subject Re: Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL
Date
Msg-id CAKFQuwYEwYezVX4RAiszedMo5Zv-nd-VY0Ab=5GDzsNQpMeyQQ@mail.gmail.com
Whole thread Raw
In response to Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL  (Ayush Vatsa <ayushvatsa1810@gmail.com>)
List pgsql-general
On Tuesday, February 4, 2025, Ayush Vatsa <ayushvatsa1810@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.

pgsql-general by date:

Previous
From: Ayush Vatsa
Date:
Subject: Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL
Next
From: Thiemo Kellner
Date:
Subject: Re: Lookup tables