Re: documentation fix for SET ROLE

From: Joe Conway <mail(at)joeconway(dot)com>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: documentation fix for SET ROLE
Date: 2021-03-12 19:13:44
Message-ID: e187153d-0b98-7f22-1834-c6f405a9812b@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/12/21 1:16 PM, Bossart, Nathan wrote:
> On 3/12/21, 6:35 AM, "Laurenz Albe" <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>> On Fri, 2021-03-12 at 10:16 +0100, I wrote:
>>> After sleeping on it, I have come to think that it is excessive to write
>>> so much documentation for a feature that is that unimportant.
>>>
>>> It takes some effort to come up with a good use case for it.
>>>
>>> I think we can add a few lines to ALTER ROLE, perhaps ALTER DATABASE
>>> (although I don't see what sense it could make to set that on the database level),
>>> and briefly explain the difference between RESET ROLE and SET ROLE NONE.
>>>
>>> I think adding too much detail will harm - anyone who needs to know the
>>> exact truth can resort to the implementation.
>>>
>>> I'll try to come up with a proposal later.
>>
>> Attached is my idea of the documentation change.
>>
>> I think that ALTER DATABASE ... SET ROLE can remain undocumented, because
>> I cannot imagine that it could be useful.
>>
>> I am unsure if specifying "role" in a libpq connect string might be
>> worth documenting. Can you think of a use case?
>
> My main goal of this thread is to get the RESET ROLE documentation
> fixed. I don't have a terribly strong opinion on documenting these
> special uses of "role". I lean in favor of adding it, but I wouldn't
> be strongly opposed to simply leaving it out for now. But if we're
> going to add it, I think we might as well add it everywhere.

Looking back at the commit history it seems to me that this only works
accidentally. Perhaps it would be best to fix RESET ROLE and be done with it.

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-03-12 19:24:01 Re: pg_amcheck contrib application
Previous Message er 2021-03-12 19:05:03 Re: pg_amcheck contrib application