On Fri, Mar 12, 2021 at 7:35 AM Laurenz Albe <laurenz.a...@cybertec.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? > Does our imagination really matter here? It works and is just as "useful" as "ALTER ROLE" and so should be documented if we document ALTER ROLE. I agree that ALTER DATABASE seems entirely useless and even counter-productive...but I would still document if only because we document ALTER ROLE and they should be kept similar. Haven't formed an opinion on the merits of the two patches. David J.