From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add psql \drg command to display role grants.
Date: Wed, 19 Jul 2023 16:46:39 +0000
Message-ID: <E1qMAJy-000IeH-Rt@gemulon.postgresql.org> (raw)
Add psql \drg command to display role grants.
With the addition of INHERIT and SET options for role grants,
the historical display of role memberships in \du/\dg is woefully
inadequate. Besides those options, there are pre-existing
shortcomings that you can't see the ADMIN option nor the grantor.
To fix this, remove the "Member of" column from \du/\dg altogether
(making that output usefully narrower), and invent a new meta-command
"\drg" that is specifically for displaying role memberships. It
shows one row for each role granted to the selected role(s), with
the grant options and grantor.
We would not normally back-patch such a feature addition post
feature freeze, but in this case the change is mainly driven by
v16 changes in the server, so it seems appropriate to include it
in v16.
Pavel Luzanov, with bikeshedding and review from a lot of people,
but particularly David Johnston
Discussion: https://postgr.es/m/b9be2d0e-a9bc-0a30-492f-a4f68e4f7740@postgrespro.ru
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0a1d2a7df852f16c452eef8a83003943125162c7
Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 22 ++++++++++
src/bin/psql/command.c | 2 +
src/bin/psql/describe.c | 87 ++++++++++++++++++++++++++++++++------
src/bin/psql/describe.h | 3 ++
src/bin/psql/help.c | 1 +
src/bin/psql/tab-complete.c | 6 ++-
src/test/regress/expected/psql.out | 46 ++++++++++++++++++--
src/test/regress/sql/psql.sql | 26 ++++++++++++
8 files changed, 175 insertions(+), 18 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add psql \drg command to display role grants.
In-Reply-To: <E1qMAJy-000IeH-Rt@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox