Re: Alter default privileges is not working for roles

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Teju Jakkidi vlogs <teja(dot)jakkidi05(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Alter default privileges is not working for roles
Date: 2023-02-22 21:03:31
Message-ID: 285758.1677099811@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Wed, Feb 22, 2023 at 10:53 AM Teju Jakkidi vlogs <
> teja(dot)jakkidi05(at)gmail(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message info 2023-02-23 13:00:46 PostgreSQL, change encoding preserving data
Previous Message David G. Johnston 2023-02-22 18:32:58 Re: Alter default privileges is not working for roles