From 3d465826f2aa86fc42b0930a6e4942585ed4ed43 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 8 Apr 2018 16:35:43 -0400 Subject: [PATCH] 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 --- doc/src/sgml/backup.sgml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index fd696c38db..58d2d88008 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -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 > 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 dbname will not be created by this command, so you must create it yourself from template0 @@ -141,7 +141,7 @@ psql dbname < 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 | psql -h h 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