From 439bdd151f78ff08fa16ac95d611a521b918d9d9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 15 May 2010 18:11:13 +0000 Subject: [PATCH] Improve documentation of pg_restore's -l and -L switches to point out their interactions with filtering switches, such as -n and -t. Per a complaint from Russell Smith. --- doc/src/sgml/ref/pg_restore.sgml | 39 +++++++++++++++++--------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index f077a5bfc6..6bf140e5d3 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -1,4 +1,4 @@ - + @@ -46,10 +46,11 @@ pg_restore can operate in two modes. - If a database name is specified, the archive is restored directly into + If a database name is specified, pg_restore + connects to that database and restores archive contents directly into the database. Otherwise, a script containing the SQL commands necessary to rebuild the database is created and written - to a file or standard output. The script output is equivalent to + to a file or standard output. This script output is equivalent to the plain text output format of pg_dump. Some of the options controlling the output are therefore analogous to pg_dump options. @@ -169,10 +170,7 @@ tar - The archive is a tar archive. Using this - archive format allows reordering and/or exclusion of schema - elements at the time the database is restored. It is also - possible to limit which data is reloaded at restore time. + The archive is a tar archive. @@ -183,10 +181,7 @@ The archive is in the custom format of - pg_dump. This is the most - flexible format in that it allows reordering of data load - as well as schema elements. This format is also compressed - by default. + pg_dump. @@ -261,8 +256,9 @@ List the contents of the archive. The output of this operation - can be used with the option to restrict - and reorder the items that are restored. + can be used as input to the option. Note that + if filtering switches such as @@ -272,11 +268,18 @@ - Restore elements in - list-file only, and in the - order they appear in the file. Lines can be moved and can also - be commented out by placing a ; at the - start of the line. (See below for examples.) + Restore only those archive elements that are listed in list-file, and restore them in the + order they appear in the file. Note that + if filtering switches such as + + list-file is normally created by + editing the output of a previous