1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

psql: Add support for \dpS and \zS.

This allows an optional "S" modifier to be added to \dp and \z, to
have them include system objects in the list.

Note that this also changes the behaviour of a bare \dp or \z without
the "S" modifier to include temp objects in the list, and exclude
information_schema objects, making them consistent with other psql
meta-commands.

Nathan Bossart, reviewed by Maxim Orlov.

Discussion: https://postgr.es/m/20221206193606.GB3078082@nathanxps13
This commit is contained in:
Dean Rasheed
2023-01-07 11:09:26 +00:00
parent 2b6df05461
commit d913928c9c
4 changed files with 30 additions and 21 deletions

View File

@ -1825,14 +1825,16 @@ INSERT INTO tbl1 VALUES ($1, $2) \bind 'first value' 'second value' \g
<varlistentry>
<term><literal>\dp [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<term><literal>\dp[S] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<listitem>
<para>
Lists tables, views and sequences with their
associated access privileges.
If <replaceable class="parameter">pattern</replaceable> is
specified, only tables, views and sequences whose names match the
pattern are listed.
pattern are listed. By default only user-created objects are shown;
supply a pattern or the <literal>S</literal> modifier to include
system objects.
</para>
<para>
@ -3575,14 +3577,16 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
<varlistentry>
<term><literal>\z [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<term><literal>\z[S] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
<listitem>
<para>
Lists tables, views and sequences with their
associated access privileges.
If a <replaceable class="parameter">pattern</replaceable> is
specified, only tables, views and sequences whose names match the
pattern are listed.
pattern are listed. By default only user-created objects are shown;
supply a pattern or the <literal>S</literal> modifier to include
system objects.
</para>
<para>