Home Explore Blog CI



postgresql

25th chunk of `doc/src/sgml/ref/psql-ref.sgml`
b2c132071b8eee4a5b691e9e3eeda9b790407191fa63cfc10000000100000fb6
 <term><literal>\di[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <term><literal>\dm[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <term><literal>\ds[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <term><literal>\dt[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <term><literal>\dv[Sx+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>

        <listitem>
        <para>
        In this group of commands, the letters <literal>E</literal>,
        <literal>i</literal>, <literal>m</literal>, <literal>s</literal>,
        <literal>t</literal>, and <literal>v</literal>
        stand for foreign table, index, materialized view,
        sequence, table, and view,
        respectively.
        You can specify any or all of
        these letters, in any order, to obtain a listing of objects
        of these types.  For example, <literal>\dti</literal> lists
        tables and indexes.
        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 is listed with its
        persistence status (permanent, temporary, or unlogged),
        physical size on disk, and associated description if any.
        If <replaceable class="parameter">pattern</replaceable> is
        specified, only objects whose names match the 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>
        </listitem>
      </varlistentry>


      <varlistentry id="app-psql-meta-command-des">
        <term><literal>\des[x+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <listitem>
        <para>
        Lists foreign servers (mnemonic: <quote>external
        servers</quote>).
        If <replaceable class="parameter">pattern</replaceable> is
        specified, only those servers whose name matches 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, a
        full description of each server is shown, including the
        server's access privileges, type, version, options, and description.
        </para>
        </listitem>
      </varlistentry>


      <varlistentry id="app-psql-meta-command-det">
        <term><literal>\det[x+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <listitem>
        <para>
        Lists foreign tables (mnemonic: <quote>external tables</quote>).
        If <replaceable class="parameter">pattern</replaceable> is
        specified, only entries whose table name or schema name matches
        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,
        generic options and the foreign table description
        are also displayed.
        </para>
        </listitem>
      </varlistentry>


      <varlistentry id="app-psql-meta-command-deu">
        <term><literal>\deu[x+] [ <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> ]</literal></term>
        <listitem>
        <para>
        Lists user mappings (mnemonic: <quote>external
        users</quote>).
        If <replaceable class="parameter">pattern</replaceable>

Title: psql Meta-Commands: \d[Eimstv], \des, \det, \deu
Summary
This section outlines the functionality of several psql meta-commands: * `\d[Eimstv]`: Lists foreign tables (E), indexes (i), materialized views (m), sequences (s), tables (t), and views (v). You can combine the letters to list multiple object types (e.g., `\dti` for tables and indexes). `x` displays expanded mode, `+` includes persistence status, disk size, and description. Filters by pattern and includes system objects with `S`. * `\des`: Lists foreign servers, filtered by name. `x` displays expanded mode, `+` shows a full description including privileges, type, version, options, and description. * `\det`: Lists foreign tables, filtered by table or schema name. `x` displays expanded mode, `+` shows generic options and the table description. * `\deu`: Lists user mappings.