Home Explore Blog CI



postgresql

11th chunk of `doc/src/sgml/ref/pg_dump.sgml`
56bdc8bdc801a1a35f747914159e135101b386f16a1fd7dd0000000100000fa1
 memory use.
       </para>
       <para>
        The tar archive format currently does not support compression at all.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--binary-upgrade</option></term>
      <listitem>
       <para>
        This option is for use by in-place upgrade utilities.  Its use
        for other purposes is not recommended or supported.  The
        behavior of the option may change in future releases without
        notice.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--column-inserts</option></term>
      <term><option>--attribute-inserts</option></term>
      <listitem>
       <para>
        Dump data as <command>INSERT</command> commands with explicit
        column names (<literal>INSERT INTO
        <replaceable>table</replaceable>
        (<replaceable>column</replaceable>, ...) VALUES
        ...</literal>).  This will make restoration very slow; it is mainly
        useful for making dumps that can be loaded into
        non-<productname>PostgreSQL</productname> databases.
        Any error during restoring will cause only rows that are part of the
        problematic <command>INSERT</command> to be lost, rather than the
        entire table contents.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--disable-dollar-quoting</option></term>
      <listitem>
       <para>
        This option disables the use of dollar quoting for function bodies,
        and forces them to be quoted using SQL standard string syntax.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--disable-triggers</option></term>
      <listitem>
       <para>
        This option is relevant only when creating a dump that includes data
        but does not include schema.
        It instructs <application>pg_dump</application> to include 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 superuser.  So, you should also specify
        a superuser name with <option>-S</option>, or preferably be careful to
        start the resulting script as a superuser.
       </para>

       <para>
        This option is ignored when emitting an archive (non-text) output
        file.  For the archive formats, you can specify the option when you
        call <command>pg_restore</command>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--enable-row-security</option></term>
      <listitem>
       <para>
        This option is relevant only when dumping the contents of a table
        which has row security.  By default, <application>pg_dump</application> will set
        <xref linkend="guc-row-security"/> to off, to ensure
        that all data is dumped from the table.  If the user does not have
        sufficient privileges to bypass row security, then an error is thrown.
        This parameter instructs <application>pg_dump</application> to set
        <xref linkend="guc-row-security"/> to on instead, allowing the user
        to dump the parts of the contents of the table that they have access to.
       </para>

       <para>
        Note that if you use this option currently, you probably also want
        the dump be in <command>INSERT</command> format, as the
        <command>COPY FROM</command> during restore does not support row security.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--exclude-extension=<replaceable class="parameter">pattern</replaceable></option></term>
      <listitem>
       <para>
        Do not dump

Title: pg_dump Options: More Dumping Styles and Security
Summary
This section continues describing pg_dump options. `--binary-upgrade` is for in-place upgrades and not recommended for other uses. `--column-inserts/--attribute-inserts` dumps data as explicit column INSERT statements, making restoration slow but compatible with non-PostgreSQL databases; it also isolates row loss to specific INSERT commands upon errors. `--disable-dollar-quoting` forces the use of SQL standard string syntax for function bodies. `--disable-triggers` includes commands to temporarily disable triggers during data restoration (requires superuser privileges and is ignored for archive output). `--enable-row-security` enables row security during the dump, allowing users to dump only the data they have access to (likely requires INSERT format). Finally, `--exclude-extension` prevents the dumping of any extension matching the specified pattern.