Skip to content

Commit bd213fd

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 d2c9737 commit bd213fd

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</> writes its result to the
4141
standard output. We will see below how this can be useful.
@@ -110,9 +110,9 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
110110
be read in by the <application>psql</application> program. The
111111
general command form to restore a dump is
112112
<synopsis>
113-
psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class="parameter">infile</replaceable>
113+
psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class="parameter">dumpfile</replaceable>
114114
</synopsis>
115-
where <replaceable class="parameter">infile</replaceable> is the
115+
where <replaceable class="parameter">dumpfile</replaceable> is the
116116
file output by the <application>pg_dump</> command. The database <replaceable
117117
class="parameter">dbname</replaceable> will not be created by this
118118
command, so you must create it yourself from <literal>template0</>
@@ -140,7 +140,7 @@ psql <replaceable class="parameter">dbname</replaceable> &lt; <replaceable class
140140
behavior and have <application>psql</application> exit with an
141141
exit status of 3 if an SQL error occurs:
142142
<programlisting>
143-
psql --set ON_ERROR_STOP=on dbname &lt; infile
143+
psql --set ON_ERROR_STOP=on dbname &lt; dumpfile
144144
</programlisting>
145145
Either way, you will only have a partially restored database.
146146
Alternatively, you can specify that the whole dump should be
@@ -200,11 +200,11 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h
200200
cluster, and also preserves cluster-wide data such as role and
201201
tablespace definitions. The basic usage of this command is:
202202
<synopsis>
203-
pg_dumpall &gt; <replaceable>outfile</>
203+
pg_dumpall &gt; <replaceable>dumpfile</>
204204
</synopsis>
205205
The resulting dump can be restored with <application>psql</>:
206206
<synopsis>
207-
psql -f <replaceable class="parameter">infile</replaceable> postgres
207+
psql -f <replaceable class="parameter">dumpfile</replaceable> postgres
208208
</synopsis>
209209
(Actually, you can specify any existing database name to start from,
210210
but if you are loading into an empty cluster then <literal>postgres</>

0 commit comments

Comments
 (0)