Skip to content

Commit 893e9e6

Browse files
committed
Doc: clarify explanation of pg_dump usage.
This section confusingly used both "infile" and "outfile" to refer to the same file, i.e. the textual output of pg_dump. Use "dumpfile" for both cases, per suggestion from Jonathan Katz. Discussion: https://postgr.es/m/152311295239.31235.6487236091906987117@wrigleys.postgresql.org
1 parent 4f85f66 commit 893e9e6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/src/sgml/backup.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<xref linkend="app-pgdump"/> for this purpose. The basic usage of this
3636
command is:
3737
<synopsis>
38-
pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable class="parameter">outfile</replaceable>
38+
pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable class="parameter">dumpfile</replaceable>
3939
</synopsis>
4040
As you see, <application>pg_dump</application> writes its result to the
4141
standard output. We will see below how this can be useful.
@@ -109,9 +109,9 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
109109
be read in by the <application>psql</application> program. The
110110
general command form to restore a dump is
111111
<synopsis>
112-
psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class="parameter">infile</replaceable>
112+
psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class="parameter">dumpfile</replaceable>
113113
</synopsis>
114-
where <replaceable class="parameter">infile</replaceable> is the
114+
where <replaceable class="parameter">dumpfile</replaceable> is the
115115
file output by the <application>pg_dump</application> command. The database <replaceable
116116
class="parameter">dbname</replaceable> will not be created by this
117117
command, so you must create it yourself from <literal>template0</literal>
@@ -141,7 +141,7 @@ psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class
141141
behavior and have <application>psql</application> exit with an
142142
exit status of 3 if an SQL error occurs:
143143
<programlisting>
144-
psql --set ON_ERROR_STOP=on dbname &lt; infile
144+
psql --set ON_ERROR_STOP=on dbname &lt; dumpfile
145145
</programlisting>
146146
Either way, you will only have a partially restored database.
147147
Alternatively, you can specify that the whole dump should be
@@ -201,11 +201,11 @@ pg_dump -h <replaceable>host1</replaceable> <replaceable>dbname</replaceable> |
201201
cluster, and also preserves cluster-wide data such as role and
202202
tablespace definitions. The basic usage of this command is:
203203
<synopsis>
204-
pg_dumpall &gt; <replaceable>outfile</replaceable>
204+
pg_dumpall &gt; <replaceable>dumpfile</replaceable>
205205
</synopsis>
206206
The resulting dump can be restored with <application>psql</application>:
207207
<synopsis>
208-
psql -f <replaceable class="parameter">infile</replaceable> postgres
208+
psql -f <replaceable class="parameter">dumpfile</replaceable> postgres
209209
</synopsis>
210210
(Actually, you can specify any existing database name to start from,
211211
but if you are loading into an empty cluster then <literal>postgres</literal>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy