Re: documentation fix for SET ROLE

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Joe Conway <mail(at)joeconway(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: documentation fix for SET ROLE
Date: 2021-03-11 22:30:49
Message-ID: F17E2052-24CD-4440-A48A-E6AAAC58229A@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/11/21, 12:11 PM, "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Thursday, March 11, 2021, Bossart, Nathan <bossartn(at)amazon(dot)com> wrote:
>> Thanks for reviewing.
>>
>> On 3/11/21, 6:59 AM, "Laurenz Albe" <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>>> I have had a look at the patch, and while I agree that this should
>>> be documented, I am not happy with the patch as it is.
>>>
>>> I think we should *not* document that under "server configuration".
>>> This is confusing and will lead people to think that a role is
>>> a configuration parameter. But you cannot add
>>>
>>> role = myrole
>>>
>>> to "postgresql.conf". A role is not a GUC.
>>>
>>> I think that the place to document this is
>>> doc/src/sgml/ref/alter_role.sgml.
>>
>> I don't think I totally agree that "role" and "session_authorization"
>> aren't GUCs. They are defined in guc.c, and "role" is referred to as
>> a GUC in both miscinit.c and variable.c.
>
> Implementation details are not that convincing to me. As a user I wouldn’t think of these as being “server configuration” or even “client defaults”; typically they are just representations of me as session state.
>
> The minor bit of documentation pseudo-redundancy doesn’t bother me if I accept they are there own separate thing. The fact that set role and set session authorization are entirely distinct top-level commands in our documentation, as opposed to bundled in with plain set, is a much more convincing example for treating them uniquely and not just additional GUCs.

I see your point. What do you think about something like the attached
patch?

Nathan

Attachment Content-Type Size
v5-0001-Small-documentation-fix-for-SET-ROLE.patch application/octet-stream 6.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-03-11 22:50:05 Re: Self-join optimisation
Previous Message Tom Lane 2021-03-11 22:18:16 Re: [PATCH] Covering SPGiST index