Re: SET ROLE documentation improvement

From: Yurii Rashkovskii <yrashk(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: SET ROLE documentation improvement
Date: 2023-09-15 21:36:16
Message-ID: CA+RLCQzLoPxmMN==oQ6ZGYMCttEjAJn60qBbOePVOYT3tNZBZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 15, 2023 at 1:47 PM Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:

> On Fri, Sep 15, 2023 at 11:26:16AM -0700, Yurii Rashkovskii wrote:
> > I believe SET ROLE documentation makes a slightly incomplete statement
> > about what happens when a superuser uses SET ROLE.
> >
> > The documentation reading suggests that the superuser would lose all
> their
> > privileges. However, they still retain the ability to use `SET ROLE`
> again.
> >
> > The attached patch adds this bit to the documentation.
>
> IMO this is arguably covered by the following note:
>
> The specified <replaceable class="parameter">role_name</replaceable>
> must be a role that the current session user is a member of.
> (If the session user is a superuser, any role can be selected.)
>
>
I agree that this may be considered sufficient coverage, but I believe that
giving contextual clarification goes a long way to help people understand.
Documentation reading can be challenging.

> But I don't see a big issue with clarifying things further as you propose.
>
> I think another issue is that the aforementioned note doesn't mention the
> new SET option added in 3d14e17.
>

How do you think we should word it in that note to make it useful?

--
Y.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2023-09-16 00:00:00 Re: Infinite Interval
Previous Message Yurii Rashkovskii 2023-09-15 21:25:38 Re: ALTER ROLE documentation improvement