<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.4 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/clusterdb.sgml,v 1.5 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<title>Description</title>
<para>
- <application>clusterdb</application> is a utility for re-clustering tables
- in a <productname>PostgreSQL</productname> database. It finds table(s)
+ <application>clusterdb</application> is a utility for reclustering tables
+ in a <productname>PostgreSQL</productname> database. It finds tables
that have previously been clustered, and clusters them again on the same
index that was last used. Tables that have never been clustered are not
touched.
<title>Options</title>
<para>
- <application>clusterdb</application> accepts the following command line arguments:
+ <application>clusterdb</application> accepts the following command-line arguments:
<variablelist>
<varlistentry>
- <term><option>-d <replaceable class="parameter">dbname</replaceable></></term>
- <term><option>--dbname <replaceable class="parameter">dbname</replaceable></></term>
+ <term><option>-a</></term>
+ <term><option>--all</></term>
+ <listitem>
+ <para>
+ Cluster all databases.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></></term>
+ <term><option><optional>--dbname</> <replaceable class="parameter">dbname</replaceable></></term>
<listitem>
<para>
Specifies the name of the database to be clustered.
</varlistentry>
<varlistentry>
- <term><option>-a</></term>
- <term><option>--all</></term>
+ <term><option>-e</></term>
+ <term><option>--echo</></term>
<listitem>
<para>
- Cluster all databases.
+ Echo the commands that <application>clusterdb</application> generates
+ and sends to the server.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-q</></term>
+ <term><option>--quiet</></term>
+ <listitem>
+ <para>
+ Do not display a response.
</para>
</listitem>
</varlistentry>
<para>
<application>clusterdb</application> also accepts
- the following command line arguments for connection parameters:
-
+ the following command-line arguments for connection parameters:
+
<variablelist>
<varlistentry>
<term><option>-h <replaceable class="parameter">host</replaceable></></term>
</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><option>-e</></term>
- <term><option>--echo</></term>
- <listitem>
- <para>
- Echo the commands that <application>clusterdb</application> generates
- and sends to the server.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-q</></term>
- <term><option>--quiet</></term>
- <listitem>
- <para>
- Do not display a response.
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</para>
</refsect1>
<literal>foo</literal> in a database named
<literal>xyzzy</literal>:
<screen>
-<prompt>$ </prompt><userinput>clusterdb --verbose --table foo xyzzy</userinput>
+<prompt>$ </prompt><userinput>clusterdb --table foo xyzzy</userinput>
</screen>
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.29 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.30 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<refsect1>
<title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>-h <replaceable class="parameter">host</replaceable></></term>
- <term><option>--host <replaceable class="parameter">host</replaceable></></term>
- <listitem>
- <para>
- Specifies the host name of the machine on which the
- server is running. If host begins with a slash, it is used
- as the directory for the Unix domain socket.
- </para>
- </listitem>
- </varlistentry>
+ <para>
+ <application>createdb</application> accepts the following command-line arguments:
+ <variablelist>
<varlistentry>
- <term><option>-p <replaceable class="parameter">port</replaceable></></term>
- <term><option>--port <replaceable class="parameter">port</replaceable></></term>
+ <term><replaceable class="parameter">dbname</replaceable></term>
<listitem>
<para>
- Specifies the Internet TCP/IP port or the local Unix domain socket file
- extension on which the server is listening for connections.
+ Specifies the name of the database to be created. The name must be
+ unique among all <productname>PostgreSQL</productname> databases in this installation.
+ The default is to create a database with the same name as the
+ current system user.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-U <replaceable class="parameter">username</replaceable></></term>
- <term><option>--username <replaceable class="parameter">username</replaceable></></term>
+ <term><replaceable class="parameter">description</replaceable></term>
<listitem>
<para>
- User name to connect as
+ This optionally specifies a comment to be associated with the newly created
+ database.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-W</></term>
- <term><option>--password</></term>
+ <term><option>-D <replaceable class="parameter">location</replaceable></></term>
+ <term><option>--location <replaceable class="parameter">location</replaceable></></term>
<listitem>
<para>
- Force password prompt.
+ Specifies the alternative location for the database. See also <xref
+ linkend="app-initlocation">.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
- <term><option>-q</></term>
- <term><option>--quiet</></term>
+ <term><option>-E <replaceable class="parameter">encoding</replaceable></></term>
+ <term><option>--encoding <replaceable class="parameter">encoding</replaceable></></term>
<listitem>
<para>
- Do not display a response.
+ Specifies the character encoding scheme to be used in this database.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
- <term><option>-D <replaceable class="parameter">datadir</replaceable></></term>
- <term><option>--location <replaceable class="parameter">datadir</replaceable></></term>
+ <term><option>-q</></term>
+ <term><option>--quiet</></term>
<listitem>
<para>
- Specifies the alternative location for the database. See also <xref
- linkend="app-initlocation">.
+ Do not display a response.
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ The options <option>-D</option>, <option>-E</option>,
+ <option>-O</option>, and
+ <option>-T</option> correspond to options of the underlying
+ SQL command <xref linkend="SQL-CREATEDATABASE"
+ endterm="SQL-CREATEDATABASE-title">; see there for more information
+ about them.
+ </para>
+
+ <para>
+ <application>createdb</application> also accepts the following
+ command-line arguments for connection parameters:
+
+ <variablelist>
<varlistentry>
- <term><option>-E <replaceable class="parameter">encoding</replaceable></></term>
- <term><option>--encoding <replaceable class="parameter">encoding</replaceable></></term>
+ <term><option>-h <replaceable class="parameter">host</replaceable></></term>
+ <term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem>
<para>
- Specifies the character encoding scheme to be used in this database.
+ Specifies the host name of the machine on which the
+ server is running. If host begins with a slash, it is used
+ as the directory for the Unix domain socket.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><replaceable class="parameter">dbname</replaceable></term>
+ <term><option>-p <replaceable class="parameter">port</replaceable></></term>
+ <term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem>
<para>
- Specifies the name of the database to be created. The name must be
- unique among all <productname>PostgreSQL</productname> databases in this installation.
- The default is to create a database with the same name as the
- current system user.
+ Specifies the Internet TCP/IP port or the local Unix domain socket file
+ extension on which the server is listening for connections.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><replaceable class="parameter">description</replaceable></term>
+ <term><option>-U <replaceable class="parameter">username</replaceable></></term>
+ <term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem>
<para>
- This optionally specifies a comment to be associated with the newly created
- database.
+ User name to connect as
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-W</></term>
+ <term><option>--password</></term>
+ <listitem>
+ <para>
+ Force password prompt.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
-
- <para>
- The options <option>-h</option>, <option>-p</option>, <option>-U</option>,
- <option>-W</option>, and <option>-e</option> are passed on literally to
- <xref linkend="app-psql">.
-
- The options <option>-O</option>, <option>-D</option>,
- <option>-T</option>, and
- <option>-E</option> are converted into options for the underlying
- SQL command <xref linkend="SQL-CREATEDATABASE"
- endterm="SQL-CREATEDATABASE-title">; see there for more information
- about them.
</para>
+
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.27 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.28 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<application>createlang</application> because it performs a number
of checks and is much easier to use. See
<xref linkend="sql-createlanguage" endterm="sql-createlanguage-title">
- for more.
+ for additional information.
</para>
</refsect1>
<title>Options</title>
<para>
- <application>createlang</application> accepts the following command line arguments:
+ <application>createlang</application> accepts the following command-line arguments:
<variablelist>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>-d <replaceable class="parameter">dbname</replaceable></></term>
- <term><option>--dbname <replaceable class="parameter">dbname</replaceable></></term>
+ <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></></term>
+ <term><option><optional>--dbname</> <replaceable class="parameter">dbname</replaceable></></term>
<listitem>
<para>
Specifies to which database the language should be added.
<para>
<application>createlang</application> also accepts
- the following command line arguments for connection parameters:
+ the following command-line arguments for connection parameters:
<variablelist>
<varlistentry>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.28 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.29 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
the <literal>pg_shadow</literal> table) can create
new <productname>PostgreSQL</productname> users,
so <application>createuser</application> must be
- invoked by someone who is a <productname>PostgreSQL</productname>
+ invoked by someone who can connect as a <productname>PostgreSQL</productname>
superuser.
</para>
<refsect1>
<title>Options</title>
+ <para>
+ <application>createuser</> accepts the following command-line arguments:
+
<variablelist>
<varlistentry>
- <term><option>-h <replaceable class="parameter">host</replaceable></></term>
- <term><option>--host <replaceable class="parameter">host</replaceable></></term>
+ <term><replaceable class="parameter">username</replaceable></term>
<listitem>
<para>
- Specifies the host name of the machine on which the
- server
- is running. If host begins with a slash, it is used
- as the directory for the Unix domain socket.
+ Specifies the name of the <productname>PostgreSQL</productname> user to be created.
+ This name must be unique among all <productname>PostgreSQL</productname> users.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-a</></term>
+ <term><option>--adduser</></term>
+ <listitem>
+ <para>
+ The new user is allowed to create other users.
+ (Note: Actually, this makes the new user a <firstterm>superuser</>.
+ The option is poorly named.)
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-p <replaceable class="parameter">port</replaceable></></term>
- <term><option>--port <replaceable class="parameter">port</replaceable></></term>
+ <term><option>-A</></term>
+ <term><option>--no-adduser</></term>
<listitem>
<para>
- Specifies the Internet TCP/IP port or local Unix domain socket file
- extension on which the server
- is listening for connections.
+ The new user is not allowed to create other users (i.e.,
+ the new user is a regular user, not a superuser).
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-e</></term>
- <term><option>--echo</></term>
+ <term><option>-d</></term>
+ <term><option>--createdb</></term>
<listitem>
<para>
- Echo the queries that <application>createuser</application> generates
- and sends to the server.
+ The new user is allowed to create databases.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-q</></term>
- <term><option>--quiet</></term>
+ <term><option>-D</></term>
+ <term><option>--no-createdb</></term>
<listitem>
<para>
- Do not display a response.
+ The new user is not allowed to create databases.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-d</></term>
- <term><option>--createdb</></term>
+ <term><option>-e</></term>
+ <term><option>--echo</></term>
<listitem>
<para>
- The new user is allowed to create databases.
+ Echo the queries that <application>createuser</application> generates
+ and sends to the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-D</></term>
- <term><option>--no-createdb</></term>
+ <term><option>-E</></term>
+ <term><option>--encrypted</></term>
<listitem>
<para>
- The new user is not allowed to create databases.
+ Encrypts the user's password stored in the database. If not
+ specified, the default is used.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-a</></term>
- <term><option>--adduser</></term>
+ <term><option>-i <replaceable class="parameter">uid</replaceable></></term>
+ <term><option>--sysid <replaceable class="parameter">uid</replaceable></></term>
<listitem>
<para>
- The new user is allowed to create other users.
- (Note: Actually, this makes the new user a <firstterm>superuser</>.
- The option is poorly named.)
+ Allows you to pick a non-default user ID for the new user. This is not
+ necessary, but some people like it.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-A</></term>
- <term><option>--no-adduser</></term>
+ <term><option>-N</></term>
+ <term><option>--unencrypted</></term>
<listitem>
<para>
- The new user is not allowed to create other users (i.e.,
- the new user is a regular user not a superuser).
+ Does not encrypt the user's password stored in the database. If
+ not specified, the default is used.
</para>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
- <term><option>-i <replaceable class="parameter">uid</replaceable></></term>
- <term><option>--sysid <replaceable class="parameter">uid</replaceable></></term>
+ <term><option>-q</></term>
+ <term><option>--quiet</></term>
<listitem>
<para>
- Allows you to pick a non-default user id for the new user. This is not
- necessary, but some people like it.
+ Do not display a response.
</para>
</listitem>
</varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ You will be prompted for a name and other missing information if it
+ is not specified on the command line.
+ </para>
+
+ <para>
+ <application>createuser</application> also accepts the following
+ command-line arguments for connection parameters:
+
+ <variablelist>
<varlistentry>
- <term><option>-E</></term>
- <term><option>--encrypted</></term>
+ <term><option>-h <replaceable class="parameter">host</replaceable></></term>
+ <term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem>
<para>
- Encrypts the user's password stored in the database. If not
- specified, the default is used.
+ Specifies the host name of the machine on which the
+ server
+ is running. If host begins with a slash, it is used
+ as the directory for the Unix domain socket.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-N</></term>
- <term><option>--unencrypted</></term>
+ <term><option>-p <replaceable class="parameter">port</replaceable></></term>
+ <term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem>
<para>
- Does not encrypt the user's password stored in the database. If
- not specified, the default is used.
+ Specifies the Internet TCP/IP port or local Unix domain socket file
+ extension on which the server
+ is listening for connections.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><replaceable class="parameter">username</replaceable></term>
+ <term><option>-U <replaceable class="parameter">username</replaceable></></term>
+ <term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem>
<para>
- Specifies the name of the <productname>PostgreSQL</productname> user to be created.
- This name must be unique among all <productname>PostgreSQL</productname> users.
+ User name to connect as (not the user name to create)
</para>
</listitem>
- </varlistentry>
- </variablelist>
+ </varlistentry>
- <para>
- You will be prompted for a name and other missing information if it is not
- specified on the command line.
- </para>
-
- <para>
- The options <literal>-h</literal>, <literal>-p</literal>, and <literal>-e</literal>,
- are passed on literally to <xref linkend="APP-PSQL">. The
- <application>psql</application> options <literal>-U</literal> and <literal>-W</literal>
- are available as well, but their use can be confusing in this context.
- </para>
+ <varlistentry>
+ <term><option>-W</></term>
+ <term><option>--password</></term>
+ <listitem>
+ <para>
+ Force password prompt (to connect to the server, not for the
+ password of the new user).
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.18 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.19 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<refsect1>
- <title>Options</title>
+ <title>Options</title>
+
+ <para>
+ <application>dropdb</> accepts the following command-line arguments:
<variablelist>
<varlistentry>
- <term><option>-h <replaceable class="parameter">host</replaceable></></term>
- <term><option>--host <replaceable class="parameter">host</replaceable></></term>
+ <term><replaceable class="parameter">dbname</replaceable></term>
<listitem>
<para>
- Specifies the host name of the machine on which the
- server
- is running. If host begins with a slash, it is used
- as the directory for the Unix domain socket.
+ Specifies the name of the database to be removed. The database
+ must be one of the existing <productname>PostgreSQL</productname> databases
+ in this installation.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-p <replaceable class="parameter">port</replaceable></></term>
- <term><option>--port <replaceable class="parameter">port</replaceable></></term>
+ <term><option>-e</></term>
+ <term><option>--echo</></term>
<listitem>
<para>
- Specifies the Internet TCP/IP port or local Unix domain socket file
- extension on which the server
- is listening for connections.
+ Echo the queries that <application>dropdb</application> generates
+ and sends to the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-U <replaceable class="parameter">username</replaceable></></term>
- <term><option>--username <replaceable class="parameter">username</replaceable></></term>
+ <term><option>-i</></term>
+ <term><option>--interactive</></term>
<listitem>
<para>
- User name to connect as
+ Issues a verification prompt before doing anything destructive.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-W</></term>
- <term><option>--password</></term>
+ <term><option>-q</></term>
+ <term><option>--quiet</></term>
<listitem>
<para>
- Force password prompt.
+ Do not display a response.
</para>
</listitem>
</varlistentry>
+ </variablelist>
+ </para>
+
+ <para>
+ <application>createdb</application> also accepts the following
+ command-line arguments for connection parameters:
+ <variablelist>
<varlistentry>
- <term><option>-e</></term>
- <term><option>--echo</></term>
+ <term><option>-h <replaceable class="parameter">host</replaceable></></term>
+ <term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem>
<para>
- Echo the queries that <application>dropdb</application> generates
- and sends to the server.
+ Specifies the host name of the machine on which the
+ server
+ is running. If host begins with a slash, it is used
+ as the directory for the Unix domain socket.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-q</></term>
- <term><option>--quiet</></term>
+ <term><option>-p <replaceable class="parameter">port</replaceable></></term>
+ <term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem>
<para>
- Do not display a response.
+ Specifies the Internet TCP/IP port or local Unix domain socket file
+ extension on which the server
+ is listening for connections.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-i</></term>
- <term><option>--interactive</></term>
+ <term><option>-U <replaceable class="parameter">username</replaceable></></term>
+ <term><option>--username <replaceable class="parameter">username</replaceable></></term>
<listitem>
<para>
- Issues a verification prompt before doing anything destructive.
+ User name to connect as
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><replaceable class="parameter">dbname</replaceable></term>
+ <term><option>-W</></term>
+ <term><option>--password</></term>
<listitem>
<para>
- Specifies the name of the database to be removed. The database
- must be one of the existing <productname>PostgreSQL</productname> databases
- in this installation.
+ Force password prompt.
</para>
</listitem>
</varlistentry>
- </variablelist>
-
- <para>
- The options <literal>-h</literal>, <literal>-p</literal>, <literal>-U</literal>,
- <literal>-W</literal>, and <literal>-e</literal> are passed on literally to
- <xref linkend="APP-PSQL">.
- </para>
+ </variablelist>
+ </para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.21 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.22 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<refsect1>
<title>Options</title>
+ <para>
+ <application>dropuser</application> accepts the following command-line arguments:
+
<variablelist>
<varlistentry>
- <term><option>-h <replaceable class="parameter">host</replaceable></></term>
- <term><option>--host <replaceable class="parameter">host</replaceable></></term>
+ <term><replaceable class="parameter">username</replaceable></term>
<listitem>
<para>
- Specifies the host name of the machine on which the
- server
- is running. If host begins with a slash, it is used
- as the directory for the Unix domain socket.
+ Specifies the name of the <productname>PostgreSQL</productname> user to be removed.
+ This name must exist in the <productname>PostgreSQL</productname> installation.
+ You will be prompted for a name if none is specified on the command line.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-p <replaceable class="parameter">port</replaceable></></term>
- <term><option>--port <replaceable class="parameter">port</replaceable></></term>
+ <term><option>-e</></term>
+ <term><option>--echo</></term>
<listitem>
<para>
- Specifies the Internet TCP/IP port or local Unix domain socket file
- extension on which the server
- is listening for connections.
+ Echo the queries that <application>dropuser</application> generates
+ and sends to the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-e</></term>
- <term><option>--echo</></term>
+ <term><option>-i</></term>
+ <term><option>--interactive</></term>
<listitem>
<para>
- Echo the queries that <application>dropuser</application> generates
- and sends to the server.
+ Prompt for confirmation before actually removing the user.
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ <application>createuser</application> also accepts the following
+ command-line arguments for connection parameters:
+
+ <variablelist>
<varlistentry>
- <term><option>-i</></term>
- <term><option>--interactive</></term>
+ <term><option>-h <replaceable class="parameter">host</replaceable></></term>
+ <term><option>--host <replaceable class="parameter">host</replaceable></></term>
<listitem>
<para>
- Prompt for confirmation before actually removing the user.
+ Specifies the host name of the machine on which the
+ server
+ is running. If host begins with a slash, it is used
+ as the directory for the Unix domain socket.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><replaceable class="parameter">username</replaceable></term>
+ <term><option>-p <replaceable class="parameter">port</replaceable></></term>
+ <term><option>--port <replaceable class="parameter">port</replaceable></></term>
<listitem>
<para>
- Specifies the name of the <productname>PostgreSQL</productname> user to be removed.
- This name must exist in the <productname>PostgreSQL</productname> installation.
- You will be prompted for a name if none is specified on the command line.
+ Specifies the Internet TCP/IP port or local Unix domain socket file
+ extension on which the server
+ is listening for connections.
</para>
</listitem>
</varlistentry>
- </variablelist>
- <para>
- The options <literal>-h</literal>, <literal>-p</literal>, and <literal>-e</literal>,
- are passed on literally to <xref linkend="APP-PSQL">. The
- <application>psql</application> options <literal>-U</literal> and <literal>-W</literal>
- are available as well, but they can be confusing in this context.
- </para>
+ <varlistentry>
+ <term><option>-U <replaceable class="parameter">username</replaceable></></term>
+ <term><option>--username <replaceable class="parameter">username</replaceable></></term>
+ <listitem>
+ <para>
+ User name to connect as (not the user name to drop)
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-W</></term>
+ <term><option>--password</></term>
+ <listitem>
+ <para>
+ Force password prompt (to connect to the server, not for the
+ password of the user to be dropped).
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.22 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.23 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<refsynopsisdiv>
<cmdsynopsis>
<command>initdb</command>
- <group choice="plain">
- <arg>--pgdata </arg>
- <arg>-D </arg>
- <replaceable>directory</replaceable>
- </group>
- <group>
- <arg>--username </arg>
- <arg>-U </arg>
- <replaceable>username</replaceable>
- </group>
- <group><arg>--pwprompt</arg><arg>-W</arg></group>
- <group>
- <arg>--encoding </arg>
- <arg>-E </arg>
- <replaceable>encoding</replaceable>
- </group>
- <arg>--locale <replaceable>locale</replaceable></arg>
- <arg>--lc-collate <replaceable>locale</replaceable></arg>
- <arg>--lc-ctype <replaceable>locale</replaceable></arg>
- <arg>--lc-messages <replaceable>locale</replaceable></arg>
- <arg>--lc-monetary <replaceable>locale</replaceable></arg>
- <arg>--lc-numeric <replaceable>locale</replaceable></arg>
- <arg>--lc-time <replaceable>locale</replaceable></arg>
- <arg>-L <replaceable>directory</replaceable></arg>
- <group><arg>--noclean</arg><arg>-n</arg></group>
- <group><arg>--debug</arg><arg>-d</arg></group>
+ <arg rep="repeat">options</arg>
+ <group choice="plain">
+ <arg>--pgdata </arg>
+ <arg>-D </arg>
+ <replaceable>directory</replaceable>
+ </group>
</cmdsynopsis>
</refsynopsisdiv>
<command>su</command> to become the database user, and
finally run <command>initdb</command> as the database user.
</para>
+ </refsect1>
- <refsect2>
- <title>Options</title>
+ <refsect1>
+ <title>Options</title>
<para>
<variablelist>
<varlistentry>
- <term><option>--pgdata=<replaceable class="parameter">directory</replaceable></option></term>
<term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
+ <term><option>--pgdata=<replaceable class="parameter">directory</replaceable></option></term>
<listitem>
<para>
This option specifies the directory where the database system
</varlistentry>
<varlistentry>
- <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
- <term><option>-U <replaceable class="parameter">username</replaceable></option></term>
- <listitem>
- <para>
- Selects the user name of the database superuser. This defaults
- to the name of the effective user running
- <command>initdb</command>. It is really not important what the
- superuser's name is, but one might choose to keep the
- customary name <systemitem>postgres</systemitem>, even if the operating
- system user's name is different.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--pwprompt</option></term>
- <term><option>-W</option></term>
- <listitem>
- <para>
- Makes <command>initdb</command> prompt for a password
- to give the database superuser. If you don't plan on using password
- authentication, this is not important. Otherwise you won't be
- able to use password authentication until you have a password
- set up.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--encoding=<replaceable class="parameter">encoding</replaceable></option></term>
<term><option>-E <replaceable class="parameter">encoding</replaceable></option></term>
+ <term><option>--encoding=<replaceable class="parameter">encoding</replaceable></option></term>
<listitem>
<para>
Selects the encoding of the template database. This will also
</para>
</listitem>
</varlistentry>
- </variablelist>
+
+ <varlistentry>
+ <term><option>-U <replaceable class="parameter">username</replaceable></option></term>
+ <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
+ <listitem>
+ <para>
+ Selects the user name of the database superuser. This defaults
+ to the name of the effective user running
+ <command>initdb</command>. It is really not important what the
+ superuser's name is, but one might choose to keep the
+ customary name <systemitem>postgres</systemitem>, even if the operating
+ system user's name is different.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-W</option></term>
+ <term><option>--pwprompt</option></term>
+ <listitem>
+ <para>
+ Makes <command>initdb</command> prompt for a password
+ to give the database superuser. If you don't plan on using password
+ authentication, this is not important. Otherwise you won't be
+ able to use password authentication until you have a password
+ set up.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</para>
<para>
Other, less commonly used, parameters are also available:
<variablelist>
+ <varlistentry>
+ <term><option>-d</option></term>
+ <term><option>--debug</option></term>
+ <listitem>
+ <para>
+ Print debugging output from the bootstrap backend and a few other
+ messages of lesser interest for the general public.
+ The bootstrap backend is the program <command>initdb</command>
+ uses to create the catalog tables. This option generates a tremendous
+ amount of extremely boring output.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>-L <replaceable class="parameter">directory</replaceable></option></term>
<listitem>
</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><option>-d</option></term>
- <term><option>--debug</option></term>
- <listitem>
- <para>
- Print debugging output from the bootstrap backend and a few other
- messages of lesser interest for the general public.
- The bootstrap backend is the program <command>initdb</command>
- uses to create the catalog tables. This option generates a tremendous
- amount of extremely boring output.
- </para>
- </listitem>
- </varlistentry>
-
</variablelist>
</para>
- </refsect2>
</refsect1>
<refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.16 2002/07/28 15:22:20 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.17 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<refsect1 id="R1-APP-INITLOCATION-2">
<title>Examples</title>
- <informalexample>
<para>
To create a database in an alternate location, using an
environment variable:
<prompt>$</prompt> <userinput>createdb -D PGDATA2 testdb</userinput>
</screen>
</para>
- </informalexample>
- <informalexample>
<para>
Alternatively, if you allow absolute paths you could write:
<screen>
<prompt>$</prompt> <userinput>createdb -D /opt/postgres/data/testdb testdb</userinput>
</screen>
</para>
- </informalexample>
</refsect1>
<refsect1>
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.10 2002/04/21 19:02:39 thomas Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.11 2002/10/11 23:03:48 petere Exp $ -->
<refentry id="app-pgconfig">
<refmeta>
<term><option>--includedir</option></>
<listitem>
<para>
- Print the location of C and C++ header files of the client interfaces.
+ Print the location of C header files of the client interfaces.
</para>
</listitem>
</varlistentry>
<term><option>--includedir-server</option></>
<listitem>
<para>
- Print the location of C and C++ header files for server
+ Print the location of C header files for server
programming.
</para>
</listitem>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.16 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.17 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
and if so displays the <acronym>PID</acronym> and the command line
options that were used to invoke it.
</para>
+ </refsect1>
- <refsect2 id="app-pg-ctl-options">
- <title>Options</title>
- <para>
+ <refsect1 id="app-pg-ctl-options">
+ <title>Options</title>
+
+ <para>
<variablelist>
<varlistentry>
</varlistentry>
</variablelist>
</para>
- </refsect2>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.51 2002/09/07 16:14:33 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.52 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<refsynopsisdiv>
<cmdsynopsis>
<command>pg_dump</command>
- <group> <arg>-a</arg> <arg>-s</arg> </group>
- <arg>-b</arg>
- <arg>-c</arg>
- <arg>-C</arg>
- <group> <arg>-d</arg> <arg>-D</arg> </group>
- <arg>-f <replaceable>file</replaceable></arg>
- <arg>-F <replaceable>format</replaceable></arg>
- <arg>-i</arg>
- <arg>-o</arg>
- <arg>-O</arg>
- <arg>-R</arg>
- <arg>-S</arg>
- <arg>-t <replaceable>table</replaceable></arg>
- <arg>-v</arg>
- <arg>-x</arg>
- <arg>-X <replaceable>keyword</replaceable></arg>
- <arg>-Z <replaceable>0...9</replaceable></arg>
- <arg>-h <replaceable>host</replaceable></arg>
- <arg>-p <replaceable>port</replaceable></arg>
- <arg>-U <replaceable>username</replaceable></arg>
- <arg>-W</arg>
+ <arg rep="repeat"><replaceable>options</replaceable></arg>
<arg><replaceable>dbname</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
</title>
<para>
- <command>pg_dump</command> is a utility for saving a
+ <application>pg_dump</application> is a utility for saving a
<productname>PostgreSQL</productname> database into a script or an
archive file. The script files are in plain-text format and
contain the SQL commands required to reconstruct the database to
- the state it was in at the time it was saved. They can be used to
+ the state it was in at the time it was saved. To restore these
+ scripts, use <xref linkend="app-psql">. They can be used to
reconstruct the database even on other machines and other
- architectures, with some modifications even on other RDBMS
- products. Furthermore, there are alternative archive file formats that
- are meant to be
- used with <xref linkend="app-pgrestore"> to rebuild the database,
- and they also allow <command>pg_restore</command> to be selective
- about what is restored, or even to reorder the items prior to being
- restored. The archive files are also designed to be portable across
+ architectures, with some modifications even on other SQL database
+ products.
+ </para>
+
+ <para>
+ Furthermore, there are alternative archive file formats
+ that are meant to be used with <xref linkend="app-pgrestore"> to
+ rebuild the database, and they also allow
+ <application>pg_restore</application> to be selective about what is
+ restored, or even to reorder the items prior to being restored. The
+ archive files are also designed to be portable across
architectures.
</para>
<para>
- <command>pg_dump</command> will save the information necessary to
+ <application>pg_dump</application> will save the information necessary to
re-generate all user-defined types, functions, tables, indexes,
aggregates, and operators. In addition, all the data is copied out
in text format so that it can be readily copied in again, as well
as imported into tools for editing.
</para>
- <para>
- <command>pg_dump</command>
- is useful for dumping out the contents of a database to move from one
- <productname>PostgreSQL</productname> installation to another.
- </para>
-
<para>
When used with one of the archive file formats and combined with
- <xref linkend="app-pgrestore">, <command>pg_dump</command> provides a
+ <application>pg_restore</application>, <application>pg_dump</application> provides a
flexible archival and
- transfer mechanism. <command>pg_dump</command> can be used to
- backup an entire database, then <command>pg_restore</command> can
+ transfer mechanism. <application>pg_dump</application> can be used to
+ backup an entire database, then <application>pg_restore</application> can
be used to examine the archive and/or select which parts of the
database are to be restored.
The most flexible output file format is the <quote>custom</quote>
</para>
<para>
- <command>pg_dump</command> makes consistent backups even if the
- database is being used concurrently. <command>pg_dump</command>
+ <application>pg_dump</application> makes consistent backups even if the
+ database is being used concurrently. <application>pg_dump</application>
does not block other users accessing the database (readers or
writers).
</para>
<para>
Dump data as <command>INSERT</command> commands (rather
than <command>COPY</command>). This will make restoration very
- slow, but it makes the archives more portable to other RDBMS
+ slow, but it makes the archives more portable to other SQL database
packages.
</para>
</listitem>
<listitem>
<para>
Output a <filename>tar</filename> archive suitable for input into
- <command>pg_restore</command>. Using this archive format
+ <application>pg_restore</application>. Using this archive format
allows reordering and/or exclusion of schema elements
at the time the database is restored. It is also possible to limit
which data is reloaded at restore time.
<listitem>
<para>
Output a custom archive suitable for input into
- <command>pg_restore</command>. This is the most flexible
+ <application>pg_restore</application>. This is the most flexible
format in that it allows reordering of data load as well
as schema elements. This format is also compressed by default.
</para>
<para>
Do not output commands to set the
object ownership to match the original database. Typically,
- <command>pg_dump</command> issues
- (<command>psql</command>-specific) <command>\connect</command>
+ <application>pg_dump</application> issues
+ (<application>psql</application>-specific) <command>\connect</command>
statements to set ownership of schema elements. See also
under <option>-R</option> and <option>-X
use-set-session-authorization</option>. Note that
<term><option>--no-reconnect</option></term>
<listitem>
<para>
- Prohibit <command>pg_dump</command>
+ Prohibit <application>pg_dump</application>
from outputting a script that would require reconnections to
the database while being restored. An average restoration
script usually has to reconnect several times as different
users to set the original ownerships of the objects. This
option is a rather blunt instrument because it makes
- <command>pg_dump</command> lose this ownership information,
+ <application>pg_dump</application> lose this ownership information,
<emphasis>unless</emphasis> you use the <option>-X
use-set-session-authorization</option> option.
</para>
<listitem>
<para>
Normally, if a (plain-text mode) script generated by
- <command>pg_dump</command> must alter the current database
+ <application>pg_dump</application> must alter the current database
user (e.g., to set correct object ownerships), it uses the
- <xref linkend="app-psql"> <command>\connect</command> command.
+ <application>psql</application> <command>\connect</command> command.
This command actually opens a new connection, which might
require manual interaction (e.g., passwords). If you use the
<option>-X use-set-session-authorization</option> option, then
- <command>pg_dump</command> will instead output <xref
+ <application>pg_dump</application> will instead output <xref
linkend="sql-set-session-authorization" endterm="sql-set-session-authorization-title"> commands. This has
the same effect, but it requires that the user restoring the
database from the generated script be a database superuser.
<para>
Since <xref linkend="sql-set-session-authorization" endterm="sql-set-session-authorization-title"> is a
standard SQL command, whereas <command>\connect</command> only
- works in <xref linkend="app-psql">, this option also enhances
+ works in <application>psql</application>, this option also enhances
the theoretical portability of the output script.
</para>
<listitem>
<para>
This option is only relevant when creating a data-only dump.
- It instructs <command>pg_dump</command> to include commands
+ It instructs <application>pg_dump</application> to include commands
to temporarily disable triggers on the target tables while
the data is reloaded. Use this if you have referential
integrity checks or other triggers on the tables that you
<msg>
<msgmain>
<msgtext>
-<screen><computeroutput>
+<screen>
Connection to database 'template1' failed.
connectDBStart() -- connect() failed: No such file or directory
Is the postmaster running locally
and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?
-</computeroutput></screen>
+</screen>
</msgtext>
</msgmain>
</msg>
<msgexplan>
<para>
- <command>pg_dump</command> could not attach to the
- <command>postmaster</command>
- process on the specified host and port. If you see this message,
- ensure that the <command>postmaster</command>
+ <application>pg_dump</application> could not attach to the
+ PostgreSQL server on the specified host and port. If you see this message,
+ ensure that the server
is running on the proper host and that you have specified the proper
port.
</para>
<note>
<para>
- <command>pg_dump</command> internally executes
+ <application>pg_dump</application> internally executes
<command>SELECT</command> statements. If you have problems running
- <command>pg_dump</command>,
+ <application>pg_dump</application>,
make sure you are able to select information from the database using, for
example, <xref linkend="app-psql">.
</para>
<para>
If your installation has any local additions to the template1 database,
- be careful to restore the output of <command>pg_dump</command> into a
+ be careful to restore the output of <application>pg_dump</application> into a
truly empty database; otherwise you are likely to get errors due to
duplicate definitions of the added objects. To make an empty database
without any local additions, copy from template0 not template1,
for example:
<programlisting>
-CREATE DATABASE foo WITH TEMPLATE = template0;
+CREATE DATABASE foo WITH TEMPLATE template0;
</programlisting>
</para>
<para>
- <command>pg_dump</command> has a few limitations:
+ <application>pg_dump</application> has a few limitations:
<itemizedlist>
<listitem>
<para>
- When dumping a single table or as plain text, <command>pg_dump</command>
+ When dumping a single table or as plain text, <application>pg_dump</application>
does not handle large objects. Large objects must be dumped in their
entirety using one of the binary archive formats.
</para>
<listitem>
<para>
- When doing a data only dump, <command>pg_dump</command> emits queries
+ When doing a data only dump, <application>pg_dump</application> emits queries
to disable triggers on user tables before inserting the data and queries to
re-enable them after the data has been inserted. If the restore is stopped
in the middle, the system catalogs may be left in the wrong state.
<title>History</title>
<para>
- The <command>pg_dump</command> utility first appeared in
+ The <application>pg_dump</application> utility first appeared in
<application>Postgres95</application> release <literal>0.02</literal>. The
non-plain-text output formats were introduced in
<application>PostgreSQL</application> release <literal>7.1</literal>.
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.30 2002/08/10 16:57:31 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.31 2002/10/11 23:03:48 petere Exp $ -->
<refentry id="APP-PGRESTORE">
<docinfo>
<refsynopsisdiv>
<cmdsynopsis>
<command>pg_restore</command>
- <arg> -a </arg>
- <arg> -c </arg>
- <arg> -C </arg>
- <arg> -d <replaceable class="parameter">dbname</replaceable> </arg>
- <arg> -f <replaceable class="parameter">output-file</replaceable> </arg>
- <arg> -F <replaceable class="parameter">format</replaceable> </arg>
- <arg> -i </arg>
- <arg> -I <replaceable class="parameter">index</replaceable> </arg>
- <arg> -l </arg>
- <arg> -L <replaceable class="parameter">contents-file</replaceable> </arg>
- <group> <arg> -N </arg> <arg> -o </arg> <arg> -r </arg> </group>
- <arg> -O </arg>
- <arg> -P <replaceable class="parameter">function-name(argtype [, ...])</replaceable> </arg>
- <arg> -R </arg>
- <arg> -s </arg>
- <arg> -S </arg>
- <arg> -t <replaceable class="parameter">table</replaceable> </arg>
- <arg> -T <replaceable class="parameter">trigger</replaceable> </arg>
- <arg> -v </arg>
- <arg> -x </arg>
- <arg> -X <replaceable>keyword</replaceable></arg>
- <arg> -h <replaceable class="parameter">host</replaceable> </arg>
- <arg> -p <replaceable class="parameter">port</replaceable> </arg>
- <arg> -U <replaceable>username</replaceable> </arg>
- <arg> -W </arg>
- <arg> <replaceable class="parameter">archive-file</replaceable> </arg>
+ <arg rep="repeat"><replaceable>options</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="app-pgrestore-description">
- <title>
- Description
- </title>
+ <title>Description</title>
<para>
- <command>pg_restore</command> is a utility for restoring a
+ <application>pg_restore</application> is a utility for restoring a
<productname>PostgreSQL</productname> database from an archive
created by <xref linkend="app-pgdump"> in one of the non-plain-text
formats. It
<para>
The archive files contain information for
- <command>pg_restore</command> to rebuild the database, but also
- allow <command>pg_restore</command> to be selective about what is
+ <application>pg_restore</application> to rebuild the database, but also
+ allow <application>pg_restore</application> to be selective about what is
restored, or even to reorder the items prior to being restored. The
archive files are designed to be portable across architectures.
</para>
<para>
- <command>pg_restore</command> can operate in two modes: If a
+ <application>pg_restore</application> can operate in two modes: If a
database name is specified, the archive is restored directly into
the database. Otherwise, a script containing the SQL commands
necessary to rebuild the database is created (and written to a file
or standard output), similar to the ones created by the
- <command>pg_dump</command> plain text format. Some of the options
+ <application>pg_dump</application> plain text format. Some of the options
controlling the script output are therefore analogous to
- <command>pg_dump</command> options.
+ <application>pg_dump</application> options.
</para>
<para>
- Obviously, <command>pg_restore</command> cannot restore information
+ Obviously, <application>pg_restore</application> cannot restore information
that is not present in the archive file; for instance, if the
archive was made using the <quote>dump data as
<command>INSERT</command>s</quote> option,
- <command>pg_restore</command> will not be able to load the data
+ <application>pg_restore</application> will not be able to load the data
using <command>COPY</command> statements.
</para>
+ </refsect1>
- <refsect2 id="app-pgrestore-options">
- <title>
- Options
- </title>
+ <refsect1 id="app-pgrestore-options">
+ <title>Options</title>
<para>
<command>pg_restore</command> accepts the following command
<term><option>--create</option></term>
<listitem>
<para>
- Create the database before restoring into it.
- (When this switch appears, the database named with <option>-d</option>
- is used only
- to issue the initial CREATE DATABASE command. All data is restored
- into the database name that appears in the archive.)
+ Create the database before restoring into it. (When this
+ switch appears, the database named with <option>-d</option> is
+ used only to issue the initial <literal>CREATE DATABASE</>
+ command. All data is restored into the database name that
+ appears in the archive.)
</para>
</listitem>
</varlistentry>
<term><option>--dbname=<replaceable class="parameter">dbname</replaceable></option></term>
<listitem>
<para>
- Connect to database <replaceable class="parameter">dbname</replaceable> and restore
- directly into the database. Large objects can only be restored by using a direct database connection.
+ Connect to database <replaceable
+ class="parameter">dbname</replaceable> and restore directly
+ into the database. Large objects can only be restored by using
+ a direct database connection.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
Specify output file for generated script, or for the listing
- when used with <option>-l</option>. Default is the standard output.
+ when used with <option>-l</option>. Default is the standard
+ output.
</para>
</listitem>
</varlistentry>
<term><option>--format=<replaceable class="parameter">format</replaceable></option></term>
<listitem>
<para>
- Specify format of the archive.
- It is not necessary to specify the format, since <COMMAND>pg_restore</COMMAND> will
- determine the format automatically. If specified, it can be one of the following:
+ Specify format of the archive. It is not necessary to specify
+ the format, since <application>pg_restore</application> will
+ determine the format automatically. If specified, it can be
+ one of the following:
</para>
<variablelist>
-
<varlistentry>
<term>t</term>
<listitem>
<para>
- Archive is a <filename>tar</filename> archive. Using this archive format allows reordering and/or
- exclusion of schema elements at the time the database is restored. It is also possible to limit which
- data is reloaded at restore time.
+ Archive is a <filename>tar</filename> archive. Using this
+ archive format allows reordering and/or exclusion of schema
+ elements at the time the database is restored. It is also
+ possible to limit which data is reloaded at restore time.
</para>
</listitem>
</varlistentry>
<term>c</term>
<listitem>
<para>
- Archive is in the custom format of <command>pg_dump</command>. This is the most flexible format
- in that it allows reordering of data load as well as schema elements.
- This format is also compressed by default.
+ Archive is in the custom format of
+ <application>pg_dump</application>. This is the most
+ flexible format in that it allows reordering of data load
+ as well as schema elements. This format is also compressed
+ by default.
</para>
</listitem>
</varlistentry>
-
</variablelist>
-
</listitem>
</varlistentry>
<term><option>--index=<replaceable class="parameter">index</replaceable></option></term>
<listitem>
<para>
- Restore definition for named <replaceable class="parameter">index</replaceable> only.
+ Restore definition for named <replaceable
+ class="parameter">index</replaceable> only.
</para>
</listitem>
</varlistentry>
<term><option>--list</option></term>
<listitem>
<para>
- List the contents of the archive. The output of this command can be used with the <option>-L</option> option
- to restrict and reorder the items that are restored.
+ List the contents of the archive. The output of this command
+ can be used with the <option>-L</option> option to restrict
+ and reorder the items that are restored.
</para>
</listitem>
</varlistentry>
<term><option>--use-list=<replaceable class="parameter">list-file</replaceable></option></term>
<listitem>
<para>
- Restore elements in <REPLACEABLE CLASS="PARAMETER">list-file</REPLACEABLE> only, and in the
- order they appear in the file. Lines can be moved and may also be commented out by placing a <literal>;</literal> at the
+ Restore elements in <REPLACEABLE
+ CLASS="PARAMETER">list-file</REPLACEABLE> only, and in the
+ order they appear in the file. Lines can be moved and may also
+ be commented out by placing a <literal>;</literal> at the
start of the line.
</para>
</listitem>
<term><option>--orig-order</option></term>
<listitem>
<para>
- Restore items in the original dump order. By default <command>pg_dump</command> will dump items in an order convenient
- to <command>pg_dump</command>, then save the archive in a modified OID order. This option overrides the OID ordering.
+ Restore items in the original dump order. By default
+ <application>pg_dump</application> will dump items in an order
+ convenient to <application>pg_dump</application>, then save the
+ archive in a modified OID order. This option overrides the OID
+ ordering.
</para>
</listitem>
</varlistentry>
<term><option>--oid-order</option></term>
<listitem>
<para>
- Restore items in the OID order. By default <command>pg_dump</command> will dump items in an order convenient
- to <command>pg_dump</command>, then save the archive in a modified OID order. This option enforces strict OID ordering.
+ Restore items in the OID order. By default
+ <application>pg_dump</application> will dump items in an order
+ convenient to <application>pg_dump</application>, then save the
+ archive in a modified OID order. This option enforces strict
+ OID ordering.
</para>
</listitem>
</varlistentry>
<term><option>--no-owner</option></term>
<listitem>
<para>
- Prevent any attempt to restore original object ownership. Objects will be owned by the user name used
- to attach to the database.
+ Prevent any attempt to restore original object
+ ownership. Objects will be owned by the user name used to
+ attach to the database.
</para>
</listitem>
</varlistentry>
<term><option>--rearrange</option></term>
<listitem>
<para>
- Restore items in modified OID order. By default <command>pg_dump</command> will dump items in an order convenient
- to <command>pg_dump</command>, then save the archive in a modified OID order. Most objects
- will be restored in OID order, but some things (e.g., rules and indexes) will be restored at the end of
- the process irrespective of their OIDs. This option is the default.
+ Restore items in modified OID order. By default
+ <application>pg_dump</application> will dump items in an order
+ convenient to <application>pg_dump</application>, then save the
+ archive in a modified OID order. Most objects will be restored
+ in OID order, but some things (e.g., rules and indexes) will
+ be restored at the end of the process irrespective of their
+ OIDs. This option is the default.
</para>
</listitem>
</varlistentry>
<term><option>--no-reconnect</option></term>
<listitem>
<para>
- While restoring an archive, <command>pg_restore</command>
+ While restoring an archive, <application>pg_restore</application>
typically has to reconnect to the database several times with
different user names to set the correct ownership of the
created objects. If this is undesirable (e.g., because manual
interaction (passwords) would be necessary for each
reconnection), this option prevents
- <command>pg_restore</command> from issuing any reconnection
+ <application>pg_restore</application> from issuing any reconnection
requests. (A connection request while in plain text mode, not
connected to a database, is made by putting out a <xref
linkend="app-psql"> <command>\connect</command> command.)
However, this option is a rather blunt instrument because it
- makes <command>pg_restore</command> lose all object ownership
+ makes <application>pg_restore</application> lose all object ownership
information, <emphasis>unless</emphasis> you use the
<option>-X use-set-session-authorization</option> option.
</para>
ownerships), a new connection to the database must be opened,
which might require manual interaction (e.g., passwords). If
you use the <option>-X use-set-session-authorization</option> option,
- then <command>pg_restore</command> will instead use the <xref
+ then <application>pg_restore</application> will instead use the <xref
linkend="sql-set-session-authorization"> command. This has
the same effect, but it requires that the user restoring the
archive is a database superuser. This option effectively
<listitem>
<para>
This option is only relevant when performing a data-only restore.
- It instructs <command>pg_restore</command> to execute commands
+ It instructs <application>pg_restore</application> to execute commands
to temporarily disable triggers on the target tables while
the data is reloaded. Use this if you have referential
integrity checks or other triggers on the tables that you
must be done as superuser. So, you should also specify
a superuser name with <option>-S</>, or preferably specify
<option>--use-set-session-authorization</> and run
- <command>pg_restore</command> as a superuser.
+ <application>pg_restore</application> as a PostgreSQL superuser.
</para>
</listitem>
</varlistentry>
<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 host begins with a slash, it is used
- as the directory for the Unix domain socket.
+ Specifies the host name of the machine on which the server is
+ running. If host begins with a slash, it is used as the
+ directory for the Unix domain socket.
</para>
</listitem>
</varlistentry>
<term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
<listitem>
<para>
- Specifies the Internet TCP/IP port or local Unix domain socket file
- extension on which the server
- is listening for connections. The port number defaults to 5432,
- or the value of the <envar>PGPORT</envar>
- environment variable (if set).
+ Specifies the Internet TCP/IP port or local Unix domain socket
+ file extension on which the server is listening for
+ connections. The port number defaults to 5432, or the value
+ of the <envar>PGPORT</envar> environment variable (if set).
</para>
</listitem>
</varlistentry>
</varlistentry>
</variablelist>
</para>
- </refsect2>
-
</refsect1>
<msg>
<msgmain>
<msgtext>
-<screen><computeroutput>
+<screen>
Connection to database 'template1' failed.
connectDBStart() -- connect() failed: No such file or directory
Is the postmaster running locally
and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?
-</computeroutput></screen>
+</screen>
</msgtext>
</msgmain>
</msg>
<msgexplan>
<para>
- <command>pg_restore</command> could not attach to the
- <command>postmaster</command>
+ <application>pg_restore</application> could not attach to the
+ PostgreSQL server
process on the specified host and port. If you see this message,
ensure that the server
is running on the proper host and that you have specified the proper
<note>
<para>
- When a direct database connection is specified using the -d option, <command>pg_restore</command>
- internally executes <command>SQL</command> statements. If you have problems running
- <command>pg_restore</command>,
- make sure you are able to select information from the database using, for
- example, <command>psql</command>.
+ When a direct database connection is specified using the -d
+ option, <application>pg_restore</application> internally executes
+ SQL statements. If you have problems running
+ <application>pg_restore</application>, make sure you are able to select
+ information from the database using, for example,
+ <application>psql</application>.
</para>
</note>
</refsect1>
<refsect1 id="app-pgrestore-notes">
- <title>
- Notes
- </title>
+ <title>Notes</title>
<para>
- If your installation has any local additions to the template1 database,
- be careful to load the output of <command>pg_restore</command> into a
- truly empty database; otherwise you are likely to get errors due to
- duplicate definitions of the added objects. To make an empty database
- without any local additions, copy from template0 not template1,
- for example:
+ If your installation has any local additions to the
+ <literal>template1</> database, be careful to load the output of
+ <application>pg_restore</application> into a truly empty database;
+ otherwise you are likely to get errors due to duplicate definitions
+ of the added objects. To make an empty database without any local
+ additions, copy from template0 not template1, for example:
<programlisting>
CREATE DATABASE foo WITH TEMPLATE = template0;
</programlisting>
</para>
<para>
- The limitations of <command>pg_restore</command> are detailed below.
+ The limitations of <application>pg_restore</application> are detailed below.
<itemizedlist>
<listitem>
<para>
- When restoring data to a pre-existing table, <command>pg_restore</command> emits queries
+ When restoring data to a pre-existing table, <application>pg_restore</application> emits queries
to disable triggers on user tables before inserting the data then emits queries to
re-enable them after the data has been inserted. If the restore is stopped in the
middle, the system catalogs may be left in the wrong state.
<listitem>
<para>
- <command>pg_restore</command> will not restore large objects for a single table. If
+ <application>pg_restore</application> will not restore large objects for a single table. If
an archive contains large objects, then all large objects will be restored.
</para>
</listitem>
</para>
<para>
- See the <xref linkend="app-pgdump"> documentation for details on
- limitations of <command>pg_dump</command>.
+ See also the <xref linkend="app-pgdump"> documentation for details on
+ limitations of <application>pg_dump</application>.
</para>
</refsect1>
<refsect1 id="app-pgrestore-examples">
- <title>
- Examples
- </title>
+ <title>Examples</title>
<para>
To dump a database:
<title>History</title>
<para>
- The <command>pg_restore</command> utility first appeared in
+ The <application>pg_restore</application> utility first appeared in
PostgreSQL 7.1.
</para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.27 2002/07/28 15:22:21 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.28 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<para>
When running a stand-alone backend, the session user will be set to
- the user with id 1. This user does not actually have to exist, so
+ the user with ID 1. This user does not actually have to exist, so
a stand-alone backend can be used to manually recover from certain
kinds of accidental damage to the system catalogs. Implicit
- superuser powers are granted to the user with id 1 in stand-alone
+ superuser powers are granted to the user with ID 1 in stand-alone
mode.
</para>
+ </refsect1>
- <refsect2>
- <title>Options</title>
+ <refsect1>
+ <title>Options</title>
<para>
When <application>postgres</application> is started by a <xref
<application>postgres</application> command-line options.
</para>
- <refsect3>
+ <refsect2>
<title>General Purpose</title>
<para>
</varlistentry>
</variablelist>
- </refsect3>
+ </refsect2>
- <refsect3>
+ <refsect2>
<title>Options for stand-alone mode</title>
<variablelist>
</listitem>
</varlistentry>
</variablelist>
- </refsect3>
+ </refsect2>
- <refsect3>
+ <refsect2>
<title>Semi-internal Options</title>
<para>
</varlistentry>
</variablelist>
- </refsect3>
- </refsect2>
+ </refsect2>
</refsect1>
<refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.32 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.33 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
communication ports (see below). A data area is created with <xref
linkend="app-initdb">.
</para>
+ </refsect1>
+
+ <refsect1 id="app-postmaster-options">
+ <title>Options</title>
- <refsect2 id="app-postmaster-options">
- <title>Options</title>
<para>
<application>postmaster</application> accepts the following
command line arguments. For a detailed discussion of the options
</varlistentry>
</variablelist>
</para>
- </refsect2>
</refsect1>
</para>
</tip>
</refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <para>
+ <xref linkend="app-initdb">,
+ <xref linkend="app-pg-ctl">
+ </para>
+ </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.77 2002/09/22 20:44:22 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.78 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<refsect1 id="R1-APP-PSQL-3">
<title>Options</title>
- <para>
- If so configured, <application>psql</application> understands both
- standard Unix short options, and <acronym>GNU</acronym>-style long
- options. The latter are not available on all systems.
- </para>
-
<variablelist>
<varlistentry>
<term><option>-a</></term>
</listitem>
</varlistentry>
</variablelist>
+
+ <para>
+ Long options are not available on all platforms.
+ </para>
</refsect1>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.26 2002/09/21 18:32:54 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.27 2002/10/11 23:03:48 petere Exp $
PostgreSQL documentation
-->
<title>Options</title>
<para>
- <application>vacuumdb</application> accepts the following command line arguments:
+ <application>vacuumdb</application> accepts the following command-line arguments:
<variablelist>
<varlistentry>
- <term><option>-d <replaceable class="parameter">dbname</replaceable></option></term>
- <term><option>--dbname <replaceable class="parameter">dbname</replaceable></option></term>
+ <term><option><optional>-d</> <replaceable class="parameter">dbname</replaceable></option></term>
+ <term><option><optional>--dbname</> <replaceable class="parameter">dbname</replaceable></option></term>
<listitem>
<para>
Specifies the name of the database to be cleaned or analyzed.
</listitem>
</varlistentry>
+
<varlistentry>
- <term><option>-f</option></term>
- <term><option>--full</option></term>
+ <term><option>-e</></term>
+ <term><option>--echo</></term>
<listitem>
<para>
- Perform <quote>full</quote> vacuuming.
+ Echo the commands that <application>vacuumdb</application> generates
+ and sends to the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-v</option></term>
- <term><option>--verbose</option></term>
+ <term><option>-f</option></term>
+ <term><option>--full</option></term>
<listitem>
<para>
- Print detailed information during processing.
+ Perform <quote>full</quote> vacuuming.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-z</option></term>
- <term><option>--analyze</option></term>
+ <term><option>-q</></term>
+ <term><option>--quiet</></term>
<listitem>
<para>
- Calculate statistics for use by the optimizer.
+ Do not display a response.
</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-v</option></term>
+ <term><option>--verbose</option></term>
+ <listitem>
+ <para>
+ Print detailed information during processing.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-z</option></term>
+ <term><option>--analyze</option></term>
+ <listitem>
+ <para>
+ Calculate statistics for use by the optimizer.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
<para>
<application>vacuumdb</application> also accepts
- the following command line arguments for connection parameters:
+ the following command-line arguments for connection parameters:
<variablelist>
<varlistentry>
</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><option>-e</></term>
- <term><option>--echo</></term>
- <listitem>
- <para>
- Echo the commands that <application>vacuumdb</application> generates
- and sends to the server.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-q</></term>
- <term><option>--quiet</></term>
- <listitem>
- <para>
- Do not display a response.
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</para>
</refsect1>