Home Explore Blog CI



postgresql

33th chunk of `doc/src/sgml/ref/psql-ref.sgml`
33b019157f8924c5637c27cfcd786550c190b8fed6e6ca3a0000000100000fa2
 <literal>+</literal> is appended to the command name, each type is
        listed with its internal name and size, its allowed values
        if it is an <type>enum</type> type, and its associated permissions.
        By default, only user-created objects are shown;  supply a
        pattern or the <literal>S</literal> modifier to include system
        objects.
        </para>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-meta-command-du">
        <term><literal>\du[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <listitem>
        <para>
        Lists database roles.
        (Since the concepts of <quote>users</quote> and <quote>groups</quote> have been
        unified into <quote>roles</quote>, this command is now equivalent to
        <literal>\dg</literal>.)
        By default, only user-created roles are shown; supply the
        <literal>S</literal> modifier to include system roles.
        If <replaceable class="parameter">pattern</replaceable> is specified,
        only those roles whose names match the pattern are listed.
        If <literal>x</literal> is appended to the command name, the results
        are displayed in expanded mode.
        If <literal>+</literal> is appended to the command name, additional information
        is shown about each role; currently this adds the comment for each
        role.
        </para>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-meta-command-dx-lc">
        <term><literal>\dx[x+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <listitem>
        <para>
        Lists installed extensions.
        If <replaceable class="parameter">pattern</replaceable>
        is specified, only those extensions whose names match the pattern
        are listed.
        If <literal>x</literal> is appended to the command name, the results
        are displayed in expanded mode.
        If <literal>+</literal> is appended to the command name, all the objects belonging
        to each matching extension are listed.
        </para>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-meta-command-dx-uc">
        <term><literal>\dX[x] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <listitem>
        <para>
        Lists extended statistics.
        If <replaceable class="parameter">pattern</replaceable>
        is specified, only those extended statistics whose names match the
        pattern are listed.
        If <literal>x</literal> is appended to the command name, the results
        are displayed in expanded mode.
        </para>

        <para>
        The status of each kind of extended statistics is shown in a column
        named after its statistic kind (e.g. Ndistinct).
        <literal>defined</literal> means that it was requested when creating
        the statistics, and NULL means it wasn't requested.
        You can use <structname>pg_stats_ext</structname> if you'd like to
        know whether <link linkend="sql-analyze"><command>ANALYZE</command></link>
        was run and statistics are available to the planner.
        </para>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-meta-command-dy">
        <term><literal>\dy[x+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <listitem>
        <para>
        Lists event triggers.
        If <replaceable class="parameter">pattern</replaceable>
        is specified, only those event triggers whose names match the pattern
        are listed.
        If <literal>x</literal> is appended to the command name, the results
        are displayed in expanded mode.
        If <literal>+</literal> is appended to the command name, each object

Title: psql Meta-Commands: \du, \dx, \dX, \dy
Summary
This section describes the `psql` meta-commands `\du`, `\dx`, `\dX`, and `\dy`: * `\du`: Lists database roles (equivalent to `\dg`), filtering by name pattern. The `S` option includes system roles. `x` provides expanded output, and `+` shows additional role information, such as comments. * `\dx`: Lists installed extensions, filtering by name pattern. `x` provides expanded output, and `+` lists all objects belonging to each matching extension. * `\dX`: Lists extended statistics, filtering by name pattern. `x` provides expanded output. The status of each statistic kind (e.g., Ndistinct) is displayed, indicating whether it was requested during creation. * `\dy`: Lists event triggers, filtering by name pattern. `x` provides expanded output. `+` shows each object's description.