aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2001-05-17 21:12:49 +0000
committerPeter Eisentraut <peter_e@gmx.net>2001-05-17 21:12:49 +0000
commitf000ffd28ec815c4f0aff0f7daffe9a5693a9648 (patch)
tree23849a8adb2f8f0a625f9f5963748d176385dd03 /doc/src
parent761a0bb69b5a9a773786f90da8e2efa91e5a2804 (diff)
downloadpostgresql-f000ffd28ec815c4f0aff0f7daffe9a5693a9648.tar.gz
postgresql-f000ffd28ec815c4f0aff0f7daffe9a5693a9648.zip
Add -U and -W options to pg_dump and friends to support non-interactive
specification of username (like in psql). pg_dumpall now works with password authentication.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/backup.sgml25
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml22
-rw-r--r--doc/src/sgml/ref/pg_dumpall.sgml32
-rw-r--r--doc/src/sgml/ref/pg_restore.sgml19
4 files changed, 61 insertions, 37 deletions
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 160cb0bba1b..ba1b6c9b21c 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.7 2001/03/19 16:19:26 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.8 2001/05/17 21:12:48 petere Exp $ -->
<chapter id="backup">
<title>Backup and Restore</title>
@@ -61,11 +61,10 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
As any other <productname>Postgres</> client application,
<application>pg_dump</> will by default connect with the database
user name that is equal to the current Unix user name. To override
- this, either specify the <option>-u</option> option to force a prompt for
- the user name, or set the environment variable
- <envar>PGUSER</envar>. Remember that <application>pg_dump</>
- connections are subject to the normal client authentication
- mechanisms (which are described in <xref
+ this, either specify the <option>-U</option> option or set the
+ environment variable <envar>PGUSER</envar>. Remember that
+ <application>pg_dump</> connections are subject to the normal
+ client authentication mechanisms (which are described in <xref
linkend="client-authentication">).
</para>
@@ -163,20 +162,6 @@ pg_dumpall &gt; <replaceable>outfile</>
you have database superuser access, as that is required to restore
the user and group information.
</para>
-
- <para>
- <application>pg_dumpall</application> has one little flaw: It is
- not prepared for interactively authenticating to each database it
- dumps. If you are using password authentication then you need to
- set it the environment variable <envar>PGPASSWORD</envar> to
- communicate the password the the underlying calls to
- <application>pg_dump</>. More severely, if you have different
- passwords set up for each database, then
- <application>pg_dumpall</> will fail. You can either choose a
- different authentication mechanism for the purposes of backup or
- adjust the <filename>pg_dumpall</filename> shell script to your
- needs.
- </para>
</sect2>
<sect2 id="backup-dump-large">
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index ddcf5db63f8..be2afefc8f2 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.31 2001/03/17 16:27:31 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.32 2001/05/17 21:12:48 petere Exp $
Postgres documentation
-->
@@ -46,7 +46,8 @@ Postgres documentation
<arg>-Z <replaceable>0...9</replaceable></arg>
<arg>-h <replaceable>host</replaceable></arg>
<arg>-p <replaceable>port</replaceable></arg>
- <arg>-u</arg>
+ <arg>-U <replaceable>username</replaceable></arg>
+ <arg>-W</arg>
<arg choice="plain"><replaceable>dbname</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -412,13 +413,20 @@ Postgres documentation
</varlistentry>
<varlistentry>
- <term>-u</term>
+ <term>-U <replaceable>username</replaceable></term>
<listitem>
<para>
- Use password authentication.
- Prompts for
- <replaceable class="parameter">username</replaceable>
- and <replaceable class="parameter">password</replaceable>.
+ Connect as the given user.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>-W</term>
+ <listitem>
+ <para>
+ Force a password prompt. This should happen automatically if
+ the server requires password authentication.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index aa2c2a88276..bf35106c67a 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.21 2001/03/05 18:42:57 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.22 2001/05/17 21:12:48 petere Exp $
Postgres documentation
-->
@@ -23,9 +23,11 @@ Postgres documentation
<cmdsynopsis>
<command>pg_dumpall</command>
<group><arg>-c</arg><arg>--clean</arg></group>
+ <group><arg>-g</arg><arg>--globals-only</arg></group>
<arg>-h <replaceable>host</replaceable></arg>
<arg>-p <replaceable>port</replaceable></arg>
- <group><arg>-g</arg><arg>--globals-only</arg></group>
+ <arg>-U <replaceable>username</replaceable></arg>
+ <arg>-W</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -82,6 +84,15 @@ Postgres documentation
</varlistentry>
<varlistentry>
+ <term>-g, --globals-only</term>
+ <listitem>
+ <para>
+ Only dump global objects (users and groups), no databases.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>-h <replaceable>host</replaceable></term>
<listitem>
<para>
@@ -106,14 +117,23 @@ Postgres documentation
</varlistentry>
<varlistentry>
- <term>-g, --globals-only</term>
+ <term>-U <replaceable>username</replaceable></term>
<listitem>
<para>
- Only dump global objects (users and groups), no databases.
+ Connect as the given user.
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>-W</term>
+ <listitem>
+ <para>
+ Force a password prompt. This should happen automatically if
+ the server requires password authentication.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
@@ -128,8 +148,8 @@ Postgres documentation
</refsect2>
</refsect1>
- <refsect1 id="app-pg-dumpall-usage">
- <title>Usage</title>
+ <refsect1 id="app-pg-dumpall-ex">
+ <title>Examples</title>
<para>
To dump all databases:
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml
index 246154a8df2..5ab98fc0b3a 100644
--- a/doc/src/sgml/ref/pg_restore.sgml
+++ b/doc/src/sgml/ref/pg_restore.sgml
@@ -1,4 +1,4 @@
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.10 2001/03/17 16:27:31 petere Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.11 2001/05/17 21:12:48 petere Exp $ -->
<refentry id="APP-PGRESTORE">
<docinfo>
@@ -46,7 +46,8 @@
<arg> -x </arg>
<arg> -h <replaceable class="parameter">host</replaceable> </arg>
<arg> -p <replaceable class="parameter">port</replaceable> </arg>
- <arg> -u </arg>
+ <arg> -U <replaceable>username</replaceable> </arg>
+ <arg> -W </arg>
<arg> <replaceable class="parameter">archive-file</replaceable> </arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -448,10 +449,20 @@
</varlistentry>
<varlistentry>
- <term>-u</term>
+ <term>-U <replaceable>username</replaceable></term>
<listitem>
<para>
- Use password authentication. Prompts for user name and password.
+ Connect as the given user.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>-W</term>
+ <listitem>
+ <para>
+ Force a password prompt. This should happen automatically if
+ the server requires password authentication.
</para>
</listitem>
</varlistentry>