Re: Alter default privileges is not working for roles - Mailing list pgsql-admin

From Tom Lane
Subject Re: Alter default privileges is not working for roles
Date
Msg-id 285758.1677099811@sss.pgh.pa.us
Whole thread Raw
In response to Re: Alter default privileges is not working for roles  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-admin
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Feb 22, 2023 at 10:53 AM Teju Jakkidi vlogs <
> teja.jakkidi05@gmail.com> wrote:
>> alter default privileges for role ownerrole
>> Now our expectation is that if there is any table created by any user

> The specification of "ownerrole" in that command means that said default
> privileges only are created if "ownerrole" is the one creating the objects
> - not "created by any user".

It's hard to say for sure when we've been shown no details, but
I suspect what the OP is describing is event triggers that issue
ALTER OWNER commands after the fact.  The default privileges
mechanism is only applied at the instant of object creation;
we do not want ALTER OWNER or SET SCHEMA or similar commands
having random side-effects on existing privileges.

            regards, tom lane



pgsql-admin by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Alter default privileges is not working for roles
Next
From: info@denisgottardello.it
Date:
Subject: PostgreSQL, change encoding preserving data