Home Explore Blog CI



postgresql

21th chunk of `doc/src/sgml/ref/pg_dump.sgml`
cec2015d10bd2eb011ac7ebb93054ddc7c1bb94fd5db05390000000100000fa0
       will certainly require superuser privileges to restore correctly,
        whereas <command>ALTER OWNER</command> requires lesser privileges.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--with-data</option></term>
      <listitem>
       <para>
        Dump data. This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--with-schema</option></term>
      <listitem>
       <para>
        Dump schema (data definitions). This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--with-statistics</option></term>
      <listitem>
       <para>
        Dump statistics.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-?</option></term>
       <term><option>--help</option></term>
       <listitem>
       <para>
       Show help about <application>pg_dump</application> command line
       arguments, and exit.
       </para>
       </listitem>
     </varlistentry>

    </variablelist>
   </para>

   <para>
    The following command-line options control the database connection parameters.

    <variablelist>
     <varlistentry>
      <term><option>-d <replaceable class="parameter">dbname</replaceable></option></term>
      <term><option>--dbname=<replaceable class="parameter">dbname</replaceable></option></term>
      <listitem>
      <para>
       Specifies the name of the database to connect to. This is
       equivalent to specifying <replaceable
       class="parameter">dbname</replaceable> as the first non-option
       argument on the command line.  The <replaceable>dbname</replaceable>
       can be a <link linkend="libpq-connstring">connection string</link>.
       If so, connection string parameters will override any conflicting
       command line options.
      </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-h <replaceable class="parameter">host</replaceable></option></term>
      <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
      <listitem>
       <para>
        Specifies the host name of the machine on which the server is
        running.  If the value begins with a slash, it is used as the
        directory for the Unix domain socket. The default is taken
        from the <envar>PGHOST</envar> environment variable, if set,
        else a Unix domain socket connection is attempted.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
      <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
      <listitem>
       <para>
        Specifies the TCP port or local Unix domain socket file
        extension on which the server is listening for connections.
        Defaults to the <envar>PGPORT</envar> environment variable, if
        set, or a compiled-in default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-U <replaceable>username</replaceable></option></term>
      <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
      <listitem>
       <para>
        User name to connect as.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-w</option></term>
      <term><option>--no-password</option></term>
      <listitem>
       <para>
        Never issue a password prompt.  If the server requires
        password authentication and a password is not available by
        other means such as a <filename>.pgpass</filename> file, the
        connection attempt will fail.  This option can be useful in
        batch jobs and scripts where no user is present to enter a
        password.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
     

Title: pg_dump Options: Data/Schema/Statistics Dumping, Help, and Database Connection Parameters
Summary
This section describes various pg_dump options. It details options for dumping data (`--with-data`), schema (`--with-schema`), and statistics (`--with-statistics`). It also covers the `-?` or `--help` option to display help information. Finally, it lists options related to database connection parameters: `-d/--dbname` for specifying the database name, `-h/--host` for the server host, `-p/--port` for the port, `-U/--username` for the user, and `-w/--no-password` to avoid password prompts.