Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/pg_amcheck.sgml`
36e1fd1fac3fbf761e33cadc9cad71aa8b6cd4fdfe51fb9a0000000100000fa5
 <literal>myschema*.myrel*</literal> or
       database-qualified and schema-qualified, e.g.
       <literal>mydb*.myschema*.myrel*</literal>. A database-qualified
       pattern will add matching databases to the list of databases to be
       checked.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-R <replaceable class="parameter">pattern</replaceable></option></term>
     <term><option>--exclude-relation=<replaceable class="parameter">pattern</replaceable></option></term>
     <listitem>
      <para>
       Exclude relations matching the specified
       <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
       This option can be specified more than once.
      </para>
      <para>
       As with <option>--relation</option>, the
       <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> may be unqualified, schema-qualified,
       or database- and schema-qualified.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-s <replaceable class="parameter">pattern</replaceable></option></term>
     <term><option>--schema=<replaceable class="parameter">pattern</replaceable></option></term>
     <listitem>
      <para>
       Check tables and indexes in schemas matching the specified
       <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>, unless they are otherwise excluded.
       This option can be specified more than once.
      </para>
      <para>
       To select only tables in schemas matching a particular pattern,
       consider using something like
       <literal>--table=SCHEMAPAT.* --no-dependent-indexes</literal>.
       To select only indexes, consider using something like
       <literal>--index=SCHEMAPAT.*</literal>.
      </para>
      <para>
       A schema pattern may be database-qualified. For example, you may
       write <literal>--schema=mydb*.myschema*</literal> to select
       schemas matching <literal>myschema*</literal> in databases matching
       <literal>mydb*</literal>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-S <replaceable class="parameter">pattern</replaceable></option></term>
     <term><option>--exclude-schema=<replaceable class="parameter">pattern</replaceable></option></term>
     <listitem>
      <para>
       Exclude tables and indexes in schemas matching the specified
       <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
       This option can be specified more than once.
      </para>
      <para>
       As with <option>--schema</option>, the pattern may be
       database-qualified.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-t <replaceable class="parameter">pattern</replaceable></option></term>
     <term><option>--table=<replaceable class="parameter">pattern</replaceable></option></term>
     <listitem>
      <para>
       Check tables matching the specified
       <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>,
       unless they are otherwise excluded.
       This option can be specified more than once.
      </para>
      <para>
       This is similar to the <option>--relation</option> option, except that
       it applies only to tables, materialized views, and sequences, not to
       indexes.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-T <replaceable class="parameter">pattern</replaceable></option></term>
     <term><option>--exclude-table=<replaceable class="parameter">pattern</replaceable></option></term>
     <listitem>
      <para>
       Exclude tables matching the specified
       <link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
       This option can be specified more than once.
      </para>

Title: pg_amcheck Options: Schema and Table Selection
Summary
This section details the schema and table selection options for pg_amcheck. It describes how to check tables and indexes within schemas using patterns (-s/--schema), exclude them using patterns (-S/--exclude-schema), check specific tables using patterns (-t/--table), and exclude tables using patterns (-T/--exclude-table). The patterns can be database-qualified for schema selection, and the table selection option focuses on tables, materialized views, and sequences, excluding indexes.