From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Teju Jakkidi vlogs <teja.jakkidi05@gmail.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Alter default privileges is not working for roles
Date: Wed, 22 Feb 2023 16:03:31 -0500
Message-ID: <285758.1677099811@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbdbeRauJwo6RMS1aBq5yVnUAbwOQQs7B=n89RKTLbD9w@mail.gmail.com>
References: <CAKA2XvY8sH6u8454AYjqd-zXA1B=aW=PcFfcbEoPiD6OzPEtSA@mail.gmail.com>
<CAKFQuwbdbeRauJwo6RMS1aBq5yVnUAbwOQQs7B=n89RKTLbD9w@mail.gmail.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, teja.jakkidi05@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Alter default privileges is not working for roles
In-Reply-To: <285758.1677099811@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox