Home Explore Blog CI



postgresql

7th chunk of `doc/src/sgml/ref/pg_restore.sgml`
0922c158bff066729f5c0dcb9b22d839db23c4ad17a8ef850000000100000fa2
   <note>
        <para>
         When <option>-t</option> is specified, <application>pg_restore</application>
         makes no attempt to restore any other database objects that the
         selected table(s) might depend upon.  Therefore, there is no
         guarantee that a specific-table restore into a clean database will
         succeed.
        </para>
       </note>

       <note>
        <para>
         This flag does not behave identically to the <option>-t</option>
         flag of <application>pg_dump</application>.  There is not currently
         any provision for wild-card matching in <application>pg_restore</application>,
         nor can you include a schema name within its <option>-t</option>.
         And, while <application>pg_dump</application>'s <option>-t</option>
         flag will also dump subsidiary objects (such as indexes) of the
         selected table(s),
         <application>pg_restore</application>'s <option>-t</option>
         flag does not include such subsidiary objects.
        </para>
       </note>

       <note>
        <para>
         In versions prior to <productname>PostgreSQL</productname> 9.6, this flag
         matched only tables, not any other type of relation.
        </para>
       </note>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-T <replaceable class="parameter">trigger</replaceable></option></term>
      <term><option>--trigger=<replaceable class="parameter">trigger</replaceable></option></term>
      <listitem>
       <para>
        Restore named trigger only.  Multiple triggers may be specified with
        multiple <option>-T</option> switches.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-v</option></term>
      <term><option>--verbose</option></term>
      <listitem>
       <para>
        Specifies verbose mode.  This will cause
        <application>pg_restore</application> to output detailed object
        comments and start/stop times to the output file, and progress
        messages to standard error.
        Repeating the option causes additional debug-level messages
        to appear on standard error.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-V</option></term>
       <term><option>--version</option></term>
       <listitem>
       <para>
       Print the <application>pg_restore</application> version and exit.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-x</option></term>
      <term><option>--no-privileges</option></term>
      <term><option>--no-acl</option></term>
      <listitem>
       <para>
        Prevent restoration of access privileges (grant/revoke commands).
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-1</option></term>
      <term><option>--single-transaction</option></term>
      <listitem>
       <para>
        Execute the restore as a single transaction (that is, wrap the
        emitted commands in <command>BEGIN</command>/<command>COMMIT</command>).  This
        ensures that either all the commands complete successfully, or no
        changes are applied. This option implies
        <option>--exit-on-error</option>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--disable-triggers</option></term>
      <listitem>
       <para>
        This option is relevant only when performing a restore without schema.
        It instructs <application>pg_restore</application> to execute commands
        to temporarily disable triggers on the target tables while
        the data is restored.  Use this if you have referential
        integrity checks or other triggers on the tables that you
        do not want to invoke during data restore.
       </para>

       <para>
        Presently, the commands emitted for
        <option>--disable-triggers</option> must be done as

Title: pg_restore Options: Tables (cont.), Triggers, Verbose, Version, Privileges, Transactions, and Disabling Triggers
Summary
This section continues detailing pg_restore options. It elaborates on the -t/--table option's behavior and limitations regarding dependencies, wildcard matching, and subsidiary objects. It then describes options for restoring specific triggers (-T), enabling verbose mode (-v), printing the version (-V), excluding privileges (-x), executing the restore as a single transaction (-1), and disabling triggers during data restore (--disable-triggers).