Re: psql: Add role's membership options to the \du+ command

From: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql: Add role's membership options to the \du+ command
Date: 2023-01-26 13:53:38
Message-ID: 5c5650e8-6452-c250-89de-1c5d1930130b@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24.01.2023 20:16, David G. Johnston wrote:
> Yeah, I noticed the lack too, then went a bit too far afield with
> trying to compose a graph of the roles.  I'm still working on that but
> at this point it probably won't be something I try to get committed to
> psql.  Something more limited like this does need to be included.

Glad to hear that you're working on it.

> I'm not too keen on the idea of converting the existing array into a
> newline separated string.  I would try hard to make the modification
> here purely additional.

I agree with all of your arguments. A couple of months I tried to find
an acceptable variant in the background.
But apparently tried not very hard ))

In the end, the variant proposed in the patch seemed to me worthy to
show and
start a discussion. But I'm not sure that this is the best choice.

> Another thing I did with the graph was have both "member" and
> "memberof" columns in the output.  In short, every grant row in
> pg_auth_members appears twice, once in each column, so the role being
> granted membership and the role into which membership is granted both
> have visibility when you filter on them.  For the role graph I took
> this idea and extended out to an entire chain of roles (and also broke
> out user and group separately) but I think doing the direct-grant only
> here would still be a big improvement.

It will be interesting to see the result.

--
Pavel Luzanov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-01-26 14:20:57 Re: New strategies for freezing, advancing relfrozenxid early
Previous Message Robert Haas 2023-01-26 13:41:06 Re: New strategies for freezing, advancing relfrozenxid early