Re: Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL

2025-02-04 Thread Greg Sabino Mullane
On Tue, Feb 4, 2025 at 1:50 PM Ayush Vatsa wrote: > Also, what would be the best way to ensure that, by default, no roles > (except the function owner) have any privileges on new functions created in > my protected schema? > Create them in another schema altogether, then move it to my_schema once

Re: Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL

2025-02-04 Thread David G. Johnston
On Tuesday, February 4, 2025, Ayush Vatsa 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 de

Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL

2025-02-04 Thread Ayush Vatsa
Hello PostgreSQL Community, I was experimenting with default privileges in PostgreSQL and came across a behavior I didn’t fully understand. I would appreciate any insights on this. I wanted to ensure that, by default, no roles had EXECUTE privileges on functions created in my schema. To achieve t