From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Zhang <david(dot)zhang(at)highgo(dot)ca>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, rmt(at)lists(dot)postgresql(dot)org, horikyota(dot)ntt(at)gmail(dot)com |
Subject: | Re: psql: Add role's membership options to the \du+ command |
Date: | 2023-06-24 15:57:23 |
Message-ID: | CAKFQuwad6E0C+=_uk0CFK-x1jfFNeyOOmmaMObDxC5=nyF7Gvg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jun 24, 2023 at 8:11 AM Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
wrote:
> Notes
> * The name of the new command. It's a good name, if not for the history.
> There are two commands showing the same information about roles: \du and
> \dr.
> The addition of \drg may be misinterpreted: if there is \drg, then there
> is also \dug.
> Maybe it's time to think about deprecating of the \du command and leave
> only \dg in the next versions?
>
I would add \dr as the new official command to complement adding \drg and
deprecate both \du and \dg. Though actual removal and de-documenting
doesn't seem like a good idea. But if we ever did assign something
non-role to \dr it would be very confusing.
> * The new meta-command will also make sense for versions <16.
> The ADMIN OPTION is available in all supported versions.
>
Doesn't every role pre-16 gain SET permission? We can also deduce whether
the grant provides INHERIT based upon the attribute of the role in question.
> * The new meta-command will not show all roles. It will only show the
> roles included in other roles.
> To show all roles you need to add an outer join between pg_roles and
> pg_auth_members.
> But all columns except "role" will be left blank. Is it worth doing this?
>
>
I'm inclined to want this. I would be good when specifying a role to
filter upon that all rows that do exist matching that filter end up in the
output regardless if they are standalone or not.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | James Coleman | 2023-06-24 17:12:29 | Re: Stampede of the JIT compilers |
Previous Message | Pavel Luzanov | 2023-06-24 15:16:04 | Re: Things I don't like about \du's "Attributes" column |