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

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Luzanov <p.luzanov@postgrespro.ru>, "Jonathan S. Katz" <jkatz@postgresql.org>, Robert Haas <robertmhaas@gmail.com>, David Zhang <david.zhang@highgo.ca>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, rmt@lists.postgresql.org, horikyota.ntt@gmail.com
Date: 2023-07-13T15:40:35Z
Lists: pgsql-hackers
On Thu, Jul 13, 2023 at 8:01 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> > I plan to replace it to:
>
> >    pg_catalog.concat_ws(', ',
> >      CASE WHEN pam.admin_option THEN 'ADMIN' END,
> >      CASE WHEN m.rolinherit THEN 'INHERIT' END,
> >      'SET'
> >    ) AS "Options",
>
> That does not seem right.  Is it impossible for pam.set_option
> to be false?  Even if it is, should this code assume that?
>
>
That replacement is for version 15 and earlier where pam.set_option doesn't
exist at all and the presence of a row here means that set has been granted.

David J.

Commits

  1. Add psql \drg command to display role grants.