Doc: clarify explanation of pg_dump usage.
authorTom Lane
Sun, 8 Apr 2018 20:35:42 +0000 (16:35 -0400)
committerTom Lane
Sun, 8 Apr 2018 20:35:42 +0000 (16:35 -0400)
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

doc/src/sgml/backup.sgml

index 9d8e69056f7d0c2521911f5992ff357136570060..349834c35d8be9a2f5fd21427fc6ee3f711f49ad 100644 (file)
@@ -35,7 +35,7 @@
     for this purpose. The basic usage of this
    command is:
 
-pg_dump dbname > outfile
+pg_dump dbname > dumpfile
 
    As you see, pg_dump writes its result to the
    standard output. We will see below how this can be useful.
@@ -109,9 +109,9 @@ pg_dump dbname > 
     be read in by the psql program. The
     general command form to restore a dump is
 
-psql dbname < infile
+psql dbname < dumpfile
 
-    where infile is the
+    where dumpfile is the
     file output by the pg_dump command. The database 
     class="parameter">dbname will not be created by this
     command, so you must create it yourself from template0
@@ -141,7 +141,7 @@ psql dbname < 
     behavior and have psql exit with an
     exit status of 3 if an SQL error occurs:
 
-psql --set ON_ERROR_STOP=on dbname < infile
+psql --set ON_ERROR_STOP=on dbname < dumpfile
 
     Either way, you will only have a partially restored database.
     Alternatively, you can specify that the whole dump should be
@@ -201,11 +201,11 @@ pg_dump -h host1 dbname |
     cluster, and also preserves cluster-wide data such as role and
     tablespace definitions. The basic usage of this command is:
 
-pg_dumpall > outfile
+pg_dumpall > dumpfile
 
     The resulting dump can be restored with psql:
 
-psql -f infile postgres
+psql -f dumpfile postgres
 
     (Actually, you can specify any existing database name to start from,
     but if you are loading into an empty cluster then postgres