Re: Document target_role param of ALTER DEFAULT PRIVILEGES

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Jordi Gutiérrez Hermoso <jordigh(at)octave(dot)org>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Document target_role param of ALTER DEFAULT PRIVILEGES
Date: 2023-11-01 20:31:52
Message-ID: c41dff5394b86a581c741a90c13aac2e29cc98c1.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Wed, 2023-11-01 at 13:09 -0400, Bruce Momjian wrote:
> On Thu, Feb 18, 2021 at 08:16:13AM +0100, Laurenz Albe wrote:
> > On Wed, 2021-02-17 at 15:08 -0500, Jordi Gutiérrez Hermoso wrote:
> > > I just had a confusing moment trying to figure out why my roles
> > > weren't creating tables the way I was expecting them to. I didn't
> > > understand what the `target_role` parameter did. No matter how I try
> > > to read this page, I can't see an explanation for that parameter:
> > >
> > > https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html
> > >
> > > I propose an explanation like the following be added to the
> > > `target_role` parameter:
> > >
> > > This is the role that will create objects with altered default
> > > privileges. Note that changes in default privileges aren't
> > > inherited, so altering the default privileges of created objects
> > > for a parent role will not change the default privileges of
> > > objects created by inherited roles.
> >
> > +1. I cannot count the number of times I have seen people confused by that.
> >
> > Suggested patch attached.
>
> I see how people can be confused. I wrote this patch, which I think is
> simpler than the previously posted one.

Oh, I had forgotten about this patch. I like your version better.

There is another patch in the current commitfest that addresses a similar
problem, triggered by another complaint:
https://commitfest.postgresql.org/45/4633/

That patch does not cover role membership. Perhaps you could adopt that
patch and merge the information from your patch into it.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2023-11-01 20:40:43 Re: Documentation of return values of range functions lower and upper
Previous Message Bruce Momjian 2023-11-01 20:28:42 Re: Documentation of return values of range functions lower and upper