From 56c66987d1b645a14932f5051ecbb983956e8b31 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Mon, 13 Jul 2020 12:57:34 -0500
Subject: [PATCH 2/2] fixen

---
 doc/src/sgml/ref/pg_dump.sgml | 107 +++++++++-------------------------
 src/bin/pg_dump/pg_dump.c     |   4 +-
 2 files changed, 31 insertions(+), 80 deletions(-)

diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 2f2bfb4dbf..c9502dca13 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -759,91 +759,42 @@ PostgreSQL documentation
       <term><option>--filter=<replaceable class="parameter">filename</replaceable></option></term>
       <listitem>
        <para>
-        This option ensure reading object's filters from specified file.
-        If you use "-" as filename, then stdin is used as source. This file
-        has to have following line format:
+        Read objects filters from the specified file.
+        If you use "-" as a filename, the filters are read from stdin.
+        The lines of this file must have the following format:
 <synopsis>
 (+|-)[tnfd] <replaceable class="parameter">objectname</replaceable>
 </synopsis>
-        Only one object name can be specified per one line:
+       </para>
+
+       <para>
+        The first character specifies whether the object is to be included
+        (<literal>+</literal>) or excluded (<literal>-</literal>), and the
+        second character specifies the type of object to be filtered:
+        <literal>t</literal> (table),
+        <literal>n</literal> (schema),
+        <literal>f</literal> (foreign table),
+        <literal>d</literal> (table data).
+       </para>
+
+       <para>
+        With the following filter file, the dump would include table
+        <literal>mytable1</literal> and data from foreign table
+        <literal>some_foreign_table</literal>, but exclude data
+        from table <literal>mytable2</literal>.
 <programlisting>
 +t mytable1
-+t mytable2
 +f some_foreign_table
--d mytable3
+-d mytable2
 </programlisting>
-        With this file the dump ensures dump table <literal>mytable1</literal>,
-        <literal>mytable2</literal>. The data of foreign table
-        <literal>some_foreign_table</literal> will be dumped too. And the data
-        of <literal>mytable3</literal> will not be dumped.
-       </para>
-
-       <para>
-        The first char <literal>+</literal> or <literal>-</literal> specifies
-        if object name will be used as include or exclude filter.
-       </para>
-
-       <para>
-        The second char
-        <literal>t</literal>,
-        <literal>n</literal>,
-        <literal>f</literal>,
-        <literal>d</literal>
-        specifies a object type.
-
-        <variablelist>
-         <varlistentry>
-          <term><literal>t</literal></term>
-          <listitem>
-           <para>
-            In inclusive form (<literal>+</literal>) it does same work like
-            <option>--table</option>. In exclusive form (<literal>-</literal>)
-            it is same like <option>--exclude-table</option>.
-           </para>
-          </listitem>
-         </varlistentry>
-
-         <varlistentry>
-          <term><literal>n</literal></term>
-          <listitem>
-           <para>
-            In inclusive form (<literal>+</literal>) it does same work like
-            <option>--schema</option>. In exclusive form (<literal>-</literal>)
-            it is same like <option>--exclude-schema</option>.
-           </para>
-          </listitem>
-         </varlistentry>
-
-         <varlistentry>
-          <term><literal>f</literal></term>
-          <listitem>
-           <para>
-            In inclusive form (<literal>+</literal>) it does same work like
-            <option>--include-foreign-data</option>. The exclusive form
-            (<literal>-</literal>) is not allowed.
-           </para>
-          </listitem>
-         </varlistentry>
-
-         <varlistentry>
-          <term><literal>d</literal></term>
-          <listitem>
-           <para>
-            The inclusive form (<literal>+</literal>) is not allowed.
-            In exclusive form (<literal>-</literal>) it is same like
-            <option>--exclude-table-data</option>.
-           </para>
-          </listitem>
-         </varlistentry>
-        </variablelist>
-       </para>
-
-       <para>
-        The option <option>--filter</option> can be used together with options
-        <option>--table</option>, <option>--exclude-table</option>,
-        <option>--schema</option>, <option>--exclude-schema</option>,
-        <option>--include-foreign-data</option> and
-        <option>--exclude-table-data</option>.
+       </para>
+
+       <para>
+        The <option>--filter</option> option works just like the other
+        options to include or exclude tables, schemas, table data, or foreign
+        tables, and both forms may be combined.  Note that there are no options
+        to exclude a specific foreign table or to include a specific table's
+        data.
        </para>
       </listitem>
      </varlistentry>
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index fd6b7a174a..9f3da36cd5 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -18609,7 +18609,7 @@ appendReloptionsArrayAH(PQExpBuffer buffer, const char *reloptions,
 #define		PG_GETLINE_EXTEND_LINE_SIZE		1024
 
 /*
- * getline is originaly GNU function, and should not be everywhere still.
+ * getline is originally GNU function, and should not be everywhere still.
  * Use own reduced implementation.
  */
 static size_t
@@ -18719,7 +18719,7 @@ read_patterns_from_file(char *filename, DumpOptions *dopt)
 		if (chars < 2)
 			exit_invalid_filter_format(fp,
 									   filename,
-									   "too short line",
+									   "line too short",
 									   line,
 									   lineno);
 
-- 
2.17.0

