pgsql: psql: add \dconfig command to show server's configuration parame

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: psql: add \dconfig command to show server's configuration parame
Date: 2022-04-07 21:11:02
Message-ID: E1ncZPB-000n2a-R2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

psql: add \dconfig command to show server's configuration parameters.

Plain \dconfig is basically equivalent to SHOW except that you can
give it a pattern with wildcards, either to match multiple GUCs or
because you don't exactly remember the name you want.

\dconfig+ adds type, context, and access-privilege information,
mainly because every other kind of object privilege has a psql command
to show it, so GUC privileges should too. (A form of this command was
in some versions of the patch series leading up to commit a0ffa885e.
We pulled it out then because of doubts that the design and code were
up to snuff, but I think subsequent work has resolved that.)

In passing, fix incorrect completion of GUC names in GRANT/REVOKE
ON PARAMETER: a0ffa885e neglected to use the VERBATIM form of
COMPLETE_WITH_QUERY, so it misbehaved for custom (qualified) GUC
names.

Mark Dilger and Tom Lane

Discussion: https://postgr.es/m/3118455.1649267333@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e707fbb4009e9ac1d0e8b78b7af9f3f03f4cf1a

Modified Files
--------------
doc/src/sgml/ddl.sgml | 2 +-
doc/src/sgml/ref/psql-ref.sgml | 17 +++++++++++
src/bin/psql/command.c | 9 +++++-
src/bin/psql/describe.c | 62 ++++++++++++++++++++++++++++++++++++++
src/bin/psql/describe.h | 4 +++
src/bin/psql/help.c | 3 +-
src/bin/psql/tab-complete.c | 7 +++--
src/fe_utils/string_utils.c | 6 +++-
src/test/regress/expected/psql.out | 17 +++++++++++
src/test/regress/sql/psql.sql | 6 ++++
10 files changed, 127 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2022-04-07 21:34:03 Re: pgsql: Rewrite some RI code to avoid using SPI
Previous Message Tom Lane 2022-04-07 20:32:07 Re: pgsql: Rewrite some RI code to avoid using SPI