mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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 commita0ffa885e
. 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
This commit is contained in:
@ -2205,7 +2205,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
|
||||
<entry><literal>PARAMETER</literal></entry>
|
||||
<entry><literal>sA</literal></entry>
|
||||
<entry>none</entry>
|
||||
<entry>none</entry>
|
||||
<entry><literal>\dconfig+</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>SCHEMA</literal></entry>
|
||||
|
@ -1380,6 +1380,23 @@ testdb=>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>\dconfig[+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Lists server configuration parameters and their values.
|
||||
If <replaceable class="parameter">pattern</replaceable>
|
||||
is specified, only parameters whose names match the pattern are
|
||||
listed.
|
||||
If <literal>+</literal> is appended to the command name, each
|
||||
parameter is listed with its data type, context in which the
|
||||
parameter can be set, and access privileges (if non-default access
|
||||
privileges have been granted).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>\dC[+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
|
||||
<listitem>
|
||||
|
Reference in New Issue
Block a user