On Fri, Sep 25, 2020 at 09:30:00AM -0500, Justin Pryzby wrote:
> Split one patch about text search, added another one (sequences), added some
> info to commit messages, and added here.
> https://commitfest.postgresql.org/30/2744/

Added an additional patch regarding spaces between function arguments.

-- 
Justin
>From 28c0407bcf0446666e1a9a8c542ae6a4304a54f3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 21:40:17 -0500
Subject: [PATCH v3 01/12] extraneous comma

---
 doc/src/sgml/rules.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml
index bcf860b68b..d6e3463ac2 100644
--- a/doc/src/sgml/rules.sgml
+++ b/doc/src/sgml/rules.sgml
@@ -769,7 +769,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
 </para>
 
 <para>
-    The benefit of implementing views with the rule system is,
+    The benefit of implementing views with the rule system is
     that the planner has all
     the information about which tables have to be scanned plus the
     relationships between these tables plus the restrictive
@@ -781,7 +781,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
     the best path to execute the query, and the more information
     the planner has, the better this decision can be. And
     the rule system as implemented in <productname>PostgreSQL</productname>
-    ensures, that this is all information available about the query
+    ensures that this is all information available about the query
     up to that point.
 </para>
 </sect2>
-- 
2.17.0

>From 4a181e8df650e2c93a2a3fded7bfd67081bb18dc Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Wed, 23 Sep 2020 13:09:11 -0500
Subject: [PATCH v3 02/12] semicolons after END in programlisting

---
 doc/src/sgml/func.sgml    |  2 +-
 doc/src/sgml/plpgsql.sgml | 12 ++++++------
 doc/src/sgml/rules.sgml   |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index e7cff980dd..8082fddf8c 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -26597,7 +26597,7 @@ BEGIN
                      obj.object_name,
                      obj.object_identity;
     END LOOP;
-END
+END;
 $$;
 CREATE EVENT TRIGGER test_event_trigger_for_drops
    ON sql_drop
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 74b6b25878..94a3b36458 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -1181,7 +1181,7 @@ BEGIN
     SELECT users.userid INTO STRICT userid
         FROM users WHERE users.username = get_userid.username;
     RETURN userid;
-END
+END;
 $$ LANGUAGE plpgsql;
 </programlisting>
      On failure, this function might produce an error message such as
@@ -1854,7 +1854,7 @@ BEGIN
         RETURN NEXT r; -- return current row of SELECT
     END LOOP;
     RETURN;
-END
+END;
 $BODY$
 LANGUAGE plpgsql;
 
@@ -1882,7 +1882,7 @@ BEGIN
     END IF;
 
     RETURN;
- END
+ END;
 $BODY$
 LANGUAGE plpgsql;
 
@@ -1956,7 +1956,7 @@ DECLARE myvar int := 5;
 BEGIN
   CALL triple(myvar);
   RAISE NOTICE 'myvar = %', myvar;  -- prints 15
-END
+END;
 $$;
 </programlisting>
     </para>
@@ -3559,7 +3559,7 @@ BEGIN
             ROLLBACK;
         END IF;
     END LOOP;
-END
+END;
 $$;
 
 CALL transaction_test1();
@@ -5213,7 +5213,7 @@ DECLARE
 f1 int;
 BEGIN
 RETURN f1;
-END
+END;
 $$ LANGUAGE plpgsql;
 WARNING:  variable "f1" shadows a previously defined variable
 LINE 3: f1 int;
diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml
index d6e3463ac2..e81addcfa9 100644
--- a/doc/src/sgml/rules.sgml
+++ b/doc/src/sgml/rules.sgml
@@ -2087,7 +2087,7 @@ CREATE FUNCTION tricky(text, text) RETURNS bool AS $$
 BEGIN
     RAISE NOTICE '% =&gt; %', $1, $2;
     RETURN true;
-END
+END;
 $$ LANGUAGE plpgsql COST 0.0000000000000000000001;
 
 SELECT * FROM phone_number WHERE tricky(person, phone);
-- 
2.17.0

>From f3a1c02e297a501b116c079c8cbc41563522320b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 22:51:47 -0500
Subject: [PATCH v3 03/12] punctuation

---
 doc/src/sgml/catalogs.sgml | 2 +-
 doc/src/sgml/config.sgml   | 4 ++--
 doc/src/sgml/parallel.sgml | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 3927b1030d..5bd54cb218 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -1525,7 +1525,7 @@
       </para>
       <para>
        Role can log in. That is, this role can be given as the initial
-       session authorization identifier
+       session authorization identifier.
       </para></entry>
      </row>
 
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index ee914740cc..8b4a2e440f 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -10084,8 +10084,8 @@ LOG:  CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
       </term>
       <listitem>
        <para>
-        If set, do not trace locks for tables below this OID. (use to avoid
-        output on system tables)
+        If set, do not trace locks for tables below this OID (used to avoid
+        output on system tables).
        </para>
        <para>
         This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml
index e31bd9d3ce..c81abff48d 100644
--- a/doc/src/sgml/parallel.sgml
+++ b/doc/src/sgml/parallel.sgml
@@ -471,7 +471,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
   </para>
 
   <para>
-    The following operations are always parallel restricted.
+    The following operations are always parallel restricted:
   </para>
 
   <itemizedlist>
-- 
2.17.0

>From f870d8dc6a47f3e15132c9c809a74cac37374cfa Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 3 Oct 2020 23:41:35 -0500
Subject: [PATCH v3 04/12] Add spaces after commas in function calls..

..especially quoted arguments.

I think that's clearer and more conventional: f(a, b).
However, I don't think it's useful to add commas indiscriminantly, so these
aren't always changed: f(a, g(b,c)).

See also: 9436041ed848debb3d64fb5fbff6cdb35bc46d04 (jsonb_set_lax)
---
 doc/src/sgml/dblink.sgml     |  8 ++++----
 doc/src/sgml/func.sgml       | 30 +++++++++++++++---------------
 doc/src/sgml/hstore.sgml     | 10 +++++-----
 doc/src/sgml/ltree.sgml      | 12 ++++++------
 doc/src/sgml/textsearch.sgml | 30 +++++++++++++++---------------
 5 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/doc/src/sgml/dblink.sgml b/doc/src/sgml/dblink.sgml
index eba7fcfb98..bcf623117c 100644
--- a/doc/src/sgml/dblink.sgml
+++ b/doc/src/sgml/dblink.sgml
@@ -166,7 +166,7 @@ SELECT dblink_connect('myconn', 'fdtest');
  OK
 (1 row)
 
-SELECT * FROM dblink('myconn','SELECT * FROM foo') AS t(a int, b text, c text[]);
+SELECT * FROM dblink('myconn', 'SELECT * FROM foo') AS t(a int, b text, c text[]);
  a  | b |       c       
 ----+---+---------------
   0 | a | {a0,b0,c0}
@@ -615,7 +615,7 @@ dblink_exec(text sql [, bool fail_on_error]) returns text
       <para>
        The SQL command that you wish to execute in the remote database,
        for example
-       <literal>insert into foo values(0,'a','{"a0","b0","c0"}')</literal>.
+       <literal>insert into foo values(0, 'a', '{"a0","b0","c0"}')</literal>.
       </para>
      </listitem>
     </varlistentry>
@@ -652,7 +652,7 @@ SELECT dblink_connect('dbname=dblink_test_standby');
  OK
 (1 row)
 
-SELECT dblink_exec('insert into foo values(21,''z'',''{"a0","b0","c0"}'');');
+SELECT dblink_exec('insert into foo values(21, ''z'', ''{"a0","b0","c0"}'');');
    dblink_exec
 -----------------
  INSERT 943366 1
@@ -664,7 +664,7 @@ SELECT dblink_connect('myconn', 'dbname=regression');
  OK
 (1 row)
 
-SELECT dblink_exec('myconn', 'insert into foo values(21,''z'',''{"a0","b0","c0"}'');');
+SELECT dblink_exec('myconn', 'insert into foo values(21, ''z'', ''{"a0","b0","c0"}'');');
    dblink_exec
 ------------------
  INSERT 6432584 1
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 8082fddf8c..6a937515b5 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -15032,7 +15032,7 @@ table2-mapping
         per <function>to_json</function> or <function>to_jsonb</function>.
        </para>
        <para>
-        <literal>json_build_array(1,2,'foo',4,5)</literal>
+        <literal>json_build_array(1, 2, 'foo', 4, 5)</literal>
         <returnvalue>[1, 2, "foo", 4, 5]</returnvalue>
        </para></entry>
       </row>
@@ -15059,7 +15059,7 @@ table2-mapping
         per <function>to_json</function> or <function>to_jsonb</function>.
        </para>
        <para>
-        <literal>json_build_object('foo',1,2,row(3,'bar'))</literal>
+        <literal>json_build_object('foo', 1, 2, row(3,'bar'))</literal>
         <returnvalue>{"foo" : 1, "2" : {"f1":3,"f2":"bar"}}</returnvalue>
        </para></entry>
       </row>
@@ -15091,7 +15091,7 @@ table2-mapping
         <literal>json_object('{a, 1, b, "def", c, 3.5}')</literal>
         <returnvalue>{"a" : "1", "b" : "def", "c" : "3.5"}</returnvalue>
        </para>
-        <para><literal>json_object('{{a, 1},{b, "def"},{c, 3.5}}')</literal>
+        <para><literal>json_object('{{a, 1}, {b, "def"}, {c, 3.5}}')</literal>
         <returnvalue>{"a" : "1", "b" : "def", "c" : "3.5"}</returnvalue>
        </para></entry>
       </row>
@@ -15111,7 +15111,7 @@ table2-mapping
         the one-argument form.
        </para>
        <para>
-        <literal>json_object('{a, b}', '{1,2}')</literal>
+        <literal>json_object('{a,b}', '{1,2}')</literal>
         <returnvalue>{"a": "1", "b": "2"}</returnvalue>
        </para></entry>
       </row>
@@ -15502,7 +15502,7 @@ table2-mapping
         <literal>create type twoints as (a int, b int);</literal>
        </para>
        <para>
-        <literal>select * from json_populate_recordset(null::twoints, '[{"a":1,"b":2},{"a":3,"b":4}]')</literal>
+        <literal>select * from json_populate_recordset(null::twoints, '[{"a":1,"b":2}, {"a":3,"b":4}]')</literal>
         <returnvalue></returnvalue>
 <programlisting>
  a | b
@@ -15577,7 +15577,7 @@ table2-mapping
         for <function>json[b]_populate_record</function>.
        </para>
        <para>
-        <literal>select * from json_to_recordset('[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]') as x(a int, b text)</literal>
+        <literal>select * from json_to_recordset('[{"a":1,"b":"foo"}, {"a":"2","c":"bar"}]') as x(a int, b text)</literal>
         <returnvalue></returnvalue>
 <programlisting>
  a |  b
@@ -15615,11 +15615,11 @@ table2-mapping
         or at the end of the array if it is positive.
        </para>
        <para>
-        <literal>jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0,f1}','[2,3,4]', false)</literal>
+        <literal>jsonb_set('[{"f1":1,"f2":null},2,null,3]', '{0,f1}', '[2,3,4]', false)</literal>
         <returnvalue>[{"f1": [2, 3, 4], "f2": null}, 2, null, 3]</returnvalue>
        </para>
        <para>
-        <literal>jsonb_set('[{"f1":1,"f2":null},2]', '{0,f3}','[2,3,4]')</literal>
+        <literal>jsonb_set('[{"f1":1,"f2":null},2]', '{0,f3}', '[2,3,4]')</literal>
         <returnvalue>[{"f1": 1, "f2": null, "f3": [2, 3, 4]}, 2]</returnvalue>
        </para></entry>
       </row>
@@ -15711,7 +15711,7 @@ table2-mapping
         untouched.
        </para>
        <para>
-        <literal>json_strip_nulls('[{"f1":1,"f2":null},2,null,3]')</literal>
+        <literal>json_strip_nulls('[{"f1":1, "f2":null}, 2, null, 3]')</literal>
         <returnvalue>[{"f1":1},2,null,3]</returnvalue>
        </para></entry>
       </row>
@@ -15735,7 +15735,7 @@ table2-mapping
         as the <literal>@?</literal> and <literal>@@</literal> operators do.
        </para>
        <para>
-        <literal>jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
+        <literal>jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
         <returnvalue>t</returnvalue>
        </para></entry>
       </row>
@@ -15757,7 +15757,7 @@ table2-mapping
         for <function>jsonb_path_exists</function>.
        </para>
        <para>
-        <literal>jsonb_path_match('{"a":[1,2,3,4,5]}', 'exists($.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max))', '{"min":2,"max":4}')</literal>
+        <literal>jsonb_path_match('{"a":[1,2,3,4,5]}', 'exists($.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max))', '{"min":2, "max":4}')</literal>
         <returnvalue>t</returnvalue>
        </para></entry>
       </row>
@@ -15778,7 +15778,7 @@ table2-mapping
         for <function>jsonb_path_exists</function>.
        </para>
        <para>
-        <literal>select * from jsonb_path_query('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
+        <literal>select * from jsonb_path_query('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
         <returnvalue></returnvalue>
 <programlisting>
  jsonb_path_query
@@ -15806,7 +15806,7 @@ table2-mapping
         for <function>jsonb_path_exists</function>.
        </para>
        <para>
-        <literal>jsonb_path_query_array('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
+        <literal>jsonb_path_query_array('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
         <returnvalue>[2, 3, 4]</returnvalue>
        </para></entry>
       </row>
@@ -15828,7 +15828,7 @@ table2-mapping
         for <function>jsonb_path_exists</function>.
        </para>
        <para>
-        <literal>jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2,"max":4}')</literal>
+        <literal>jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min &amp;&amp; @ &lt;= $max)', '{"min":2, "max":4}')</literal>
         <returnvalue>2</returnvalue>
        </para></entry>
       </row>
@@ -15900,7 +15900,7 @@ table2-mapping
         Converts the given JSON value to pretty-printed, indented text.
        </para>
        <para>
-        <literal>jsonb_pretty('[{"f1":1,"f2":null},2]')</literal>
+        <literal>jsonb_pretty('[{"f1":1,"f2":null}, 2]')</literal>
         <returnvalue></returnvalue>
 <programlisting>
 [
diff --git a/doc/src/sgml/hstore.sgml b/doc/src/sgml/hstore.sgml
index 8a1caa3576..14a36ade00 100644
--- a/doc/src/sgml/hstore.sgml
+++ b/doc/src/sgml/hstore.sgml
@@ -631,7 +631,7 @@ b
         Does <type>hstore</type> contain key?
        </para>
        <para>
-        <literal>exist('a=&gt;1','a')</literal>
+        <literal>exist('a=&gt;1', 'a')</literal>
         <returnvalue>t</returnvalue>
        </para></entry>
       </row>
@@ -647,7 +647,7 @@ b
         for key?
        </para>
        <para>
-        <literal>defined('a=&gt;NULL','a')</literal>
+        <literal>defined('a=&gt;NULL', 'a')</literal>
         <returnvalue>f</returnvalue>
        </para></entry>
       </row>
@@ -662,7 +662,7 @@ b
         Deletes pair with matching key.
        </para>
        <para>
-        <literal>delete('a=&gt;1,b=&gt;2','b')</literal>
+        <literal>delete('a=&gt;1,b=&gt;2', 'b')</literal>
         <returnvalue>"a"=&gt;"1"</returnvalue>
        </para></entry>
       </row>
@@ -676,7 +676,7 @@ b
         Deletes pairs with matching keys.
        </para>
        <para>
-        <literal>delete('a=&gt;1,b=&gt;2,c=&gt;3',ARRAY['a','b'])</literal>
+        <literal>delete('a=&gt;1,b=&gt;2,c=&gt;3', ARRAY['a','b'])</literal>
         <returnvalue>"c"=&gt;"3"</returnvalue>
        </para></entry>
       </row>
@@ -690,7 +690,7 @@ b
         Deletes pairs matching those in the second argument.
        </para>
        <para>
-        <literal>delete('a=&gt;1,b=&gt;2','a=&gt;4,b=&gt;2'::hstore)</literal>
+        <literal>delete('a=&gt;1,b=&gt;2', 'a=&gt;4,b=&gt;2'::hstore)</literal>
         <returnvalue>"a"=&gt;"1"</returnvalue>
        </para></entry>
       </row>
diff --git a/doc/src/sgml/ltree.sgml b/doc/src/sgml/ltree.sgml
index 36aa2b5fad..06a983c075 100644
--- a/doc/src/sgml/ltree.sgml
+++ b/doc/src/sgml/ltree.sgml
@@ -460,7 +460,7 @@ Europe &amp; Russia*@ &amp; !Transportation
         position <parameter>end</parameter>-1 (counting from 0).
        </para>
        <para>
-        <literal>subltree('Top.Child1.Child2',1,2)</literal>
+        <literal>subltree('Top.Child1.Child2', 1, 2)</literal>
         <returnvalue>Child1</returnvalue>
        </para></entry>
       </row>
@@ -480,7 +480,7 @@ Europe &amp; Russia*@ &amp; !Transportation
         the end of the path.
        </para>
        <para>
-        <literal>subpath('Top.Child1.Child2',0,2)</literal>
+        <literal>subpath('Top.Child1.Child2', 0, 2)</literal>
         <returnvalue>Top.Child1</returnvalue>
        </para></entry>
       </row>
@@ -497,7 +497,7 @@ Europe &amp; Russia*@ &amp; !Transportation
         from the end of the path.
        </para>
        <para>
-        <literal>subpath('Top.Child1.Child2',1)</literal>
+        <literal>subpath('Top.Child1.Child2', 1)</literal>
         <returnvalue>Child1.Child2</returnvalue>
        </para></entry>
       </row>
@@ -528,7 +528,7 @@ Europe &amp; Russia*@ &amp; !Transportation
         <parameter>a</parameter>, or -1 if not found.
        </para>
        <para>
-        <literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6')</literal>
+        <literal>index('0.1.2.3.5.4.5.6.8.5.6.8', '5.6')</literal>
         <returnvalue>6</returnvalue>
        </para></entry>
       </row>
@@ -546,7 +546,7 @@ Europe &amp; Russia*@ &amp; !Transportation
         start <parameter>-offset</parameter> labels from the end of the path.
        </para>
        <para>
-        <literal>index('0.1.2.3.5.4.5.6.8.5.6.8','5.6',-4)</literal>
+        <literal>index('0.1.2.3.5.4.5.6.8.5.6.8', '5.6', -4)</literal>
         <returnvalue>9</returnvalue>
        </para></entry>
       </row>
@@ -584,7 +584,7 @@ Europe &amp; Russia*@ &amp; !Transportation
         (up to 8 arguments are supported).
        </para>
        <para>
-        <literal>lca('1.2.3','1.2.3.4.5.6')</literal>
+        <literal>lca('1.2.3', '1.2.3.4.5.6')</literal>
         <returnvalue>1.2</returnvalue>
        </para></entry>
       </row>
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index 2ebdf02bfa..f4433b5c1f 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -2419,7 +2419,7 @@ ALTER TEXT SEARCH CONFIGURATION astro_en
     positions in <type>tsvector</type>, which in turn affect ranking:
 
 <screen>
-SELECT to_tsvector('english','in the list of stop words');
+SELECT to_tsvector('english', 'in the list of stop words');
         to_tsvector
 ----------------------------
  'list':3 'stop':5 'word':6
@@ -2429,12 +2429,12 @@ SELECT to_tsvector('english','in the list of stop words');
     calculated for documents with and without stop words are quite different:
 
 <screen>
-SELECT ts_rank_cd (to_tsvector('english','in the list of stop words'), to_tsquery('list &amp; stop'));
+SELECT ts_rank_cd (to_tsvector('english', 'in the list of stop words'), to_tsquery('list &amp; stop'));
  ts_rank_cd
 ------------
        0.05
 
-SELECT ts_rank_cd (to_tsvector('english','list stop words'), to_tsquery('list &amp; stop'));
+SELECT ts_rank_cd (to_tsvector('english', 'list stop words'), to_tsquery('list &amp; stop'));
  ts_rank_cd
 ------------
         0.1
@@ -2493,12 +2493,12 @@ CREATE TEXT SEARCH DICTIONARY public.simple_dict (
     Now we can test our dictionary:
 
 <screen>
-SELECT ts_lexize('public.simple_dict','YeS');
+SELECT ts_lexize('public.simple_dict', 'YeS');
  ts_lexize
 -----------
  {yes}
 
-SELECT ts_lexize('public.simple_dict','The');
+SELECT ts_lexize('public.simple_dict', 'The');
  ts_lexize
 -----------
  {}
@@ -2514,12 +2514,12 @@ SELECT ts_lexize('public.simple_dict','The');
 <screen>
 ALTER TEXT SEARCH DICTIONARY public.simple_dict ( Accept = false );
 
-SELECT ts_lexize('public.simple_dict','YeS');
+SELECT ts_lexize('public.simple_dict', 'YeS');
  ts_lexize
 -----------
 
 
-SELECT ts_lexize('public.simple_dict','The');
+SELECT ts_lexize('public.simple_dict', 'The');
  ts_lexize
 -----------
  {}
@@ -2633,7 +2633,7 @@ indices index*
     Then we will get these results:
 <screen>
 mydb=# CREATE TEXT SEARCH DICTIONARY syn (template=synonym, synonyms='synonym_sample');
-mydb=# SELECT ts_lexize('syn','indices');
+mydb=# SELECT ts_lexize('syn', 'indices');
  ts_lexize
 -----------
  {index}
@@ -2641,13 +2641,13 @@ mydb=# SELECT ts_lexize('syn','indices');
 
 mydb=# CREATE TEXT SEARCH CONFIGURATION tst (copy=simple);
 mydb=# ALTER TEXT SEARCH CONFIGURATION tst ALTER MAPPING FOR asciiword WITH syn;
-mydb=# SELECT to_tsvector('tst','indices');
+mydb=# SELECT to_tsvector('tst', 'indices');
  to_tsvector
 -------------
  'index':1
 (1 row)
 
-mydb=# SELECT to_tsquery('tst','indices');
+mydb=# SELECT to_tsquery('tst', 'indices');
  to_tsquery
 ------------
  'index':*
@@ -2659,7 +2659,7 @@ mydb=# SELECT 'indexes are very useful'::tsvector;
  'are' 'indexes' 'useful' 'very'
 (1 row)
 
-mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst','indices');
+mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst', 'indices');
  ?column?
 ----------
  t
@@ -3354,7 +3354,7 @@ ts_debug(<optional> <replaceable class="parameter">config</replaceable> <type>re
    Here is a simple example:
 
 <screen>
-SELECT * FROM ts_debug('english','a fat  cat sat on a mat - it ate a fat rats');
+SELECT * FROM ts_debug('english', 'a fat  cat sat on a mat - it ate a fat rats');
    alias   |   description   | token |  dictionaries  |  dictionary  | lexemes 
 -----------+-----------------+-------+----------------+--------------+---------
  asciiword | Word, all ASCII | a     | {english_stem} | english_stem | {}
@@ -3405,7 +3405,7 @@ ALTER TEXT SEARCH CONFIGURATION public.english
 </programlisting>
 
 <screen>
-SELECT * FROM ts_debug('public.english','The Brightest supernovaes');
+SELECT * FROM ts_debug('public.english', 'The Brightest supernovaes');
    alias   |   description   |    token    |         dictionaries          |   dictionary   |   lexemes   
 -----------+-----------------+-------------+-------------------------------+----------------+-------------
  asciiword | Word, all ASCII | The         | {english_ispell,english_stem} | english_ispell | {}
@@ -3444,7 +3444,7 @@ SELECT * FROM ts_debug('public.english','The Brightest supernovaes');
 
 <screen>
 SELECT alias, token, dictionary, lexemes
-FROM ts_debug('public.english','The Brightest supernovaes');
+FROM ts_debug('public.english', 'The Brightest supernovaes');
    alias   |    token    |   dictionary   |   lexemes   
 -----------+-------------+----------------+-------------
  asciiword | The         | english_ispell | {}
@@ -3592,7 +3592,7 @@ SELECT ts_lexize('english_stem', 'a');
      where this can be confusing:
 
 <screen>
-SELECT ts_lexize('thesaurus_astro','supernovae stars') is null;
+SELECT ts_lexize('thesaurus_astro', 'supernovae stars') is null;
  ?column?
 ----------
  t
-- 
2.17.0

>From 3b6e7b9feb3febe49b9942092de917ac57a64ed2 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 22:48:52 -0500
Subject: [PATCH v3 05/12] Avoid ending a sentence about "..." with ".." ..

.. which then looks just the same as "...".
---
 doc/src/sgml/seg.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/seg.sgml b/doc/src/sgml/seg.sgml
index e86142d885..e0dfbc76cf 100644
--- a/doc/src/sgml/seg.sgml
+++ b/doc/src/sgml/seg.sgml
@@ -205,8 +205,8 @@ test=&gt; select '6.25 .. 6.50'::seg as "pH";
   </table>
 
   <para>
-   Because <literal>...</literal> is widely used in data sources, it is allowed
-   as an alternative spelling of <literal>..</literal>.  Unfortunately, this
+   Because the <literal>...</literal> operator is widely used in data sources, it is allowed
+   as an alternative spelling of the <literal>..</literal> operator.  Unfortunately, this
    creates a parsing ambiguity: it is not clear whether the upper bound
    in <literal>0...23</literal> is meant to be <literal>23</literal> or <literal>0.23</literal>.
    This is resolved by requiring at least one digit before the decimal
-- 
2.17.0

>From 9aa37155837ec292a0804fe07a7352aff10a71a4 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 22:55:48 -0500
Subject: [PATCH v3 06/12] grammar

---
 doc/src/sgml/gin.sgml               | 2 +-
 doc/src/sgml/high-availability.sgml | 2 +-
 doc/src/sgml/isn.sgml               | 2 +-
 doc/src/sgml/mvcc.sgml              | 2 +-
 doc/src/sgml/protocol.sgml          | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index 5c8d4d5275..67754f52f6 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -612,7 +612,7 @@
     </para>
     <para>
      <varname>gin_pending_list_limit</varname> can be overridden for individual
-     GIN indexes by changing storage parameters, and which allows each
+     GIN indexes by changing storage parameters, which allows each
      GIN index to have its own cleanup threshold.
      For example, it's possible to increase the threshold only for the GIN
      index which can be updated heavily, and decrease it otherwise.
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 86da84fce7..339ed38d42 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -1502,7 +1502,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
     Note that in this mode, the server will apply WAL one file at a
     time, so if you use the standby server for queries (see Hot Standby),
     there is a delay between an action in the primary and when the
-    action becomes visible in the standby, corresponding the time it takes
+    action becomes visible in the standby, corresponding to the time it takes
     to fill up the WAL file. <varname>archive_timeout</varname> can be used to make that delay
     shorter. Also note that you can't combine streaming replication with
     this method.
diff --git a/doc/src/sgml/isn.sgml b/doc/src/sgml/isn.sgml
index e55ed07312..709bc8345c 100644
--- a/doc/src/sgml/isn.sgml
+++ b/doc/src/sgml/isn.sgml
@@ -14,7 +14,7 @@
   hard-coded list of prefixes; this list of prefixes is also used to hyphenate
   numbers on output.  Since new prefixes are assigned from time to time, the
   list of prefixes may be out of date.  It is hoped that a future version of
-  this module will obtained the prefix list from one or more tables that
+  this module will obtain the prefix list from one or more tables that
   can be easily updated by users as needed; however, at present, the
   list can only be updated by modifying the source code and recompiling.
   Alternatively, prefix validation and hyphenation support may be
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
index 1d40617656..71dd403337 100644
--- a/doc/src/sgml/mvcc.sgml
+++ b/doc/src/sgml/mvcc.sgml
@@ -1245,7 +1245,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
         <para>
          The <literal>FOR UPDATE</literal> lock mode
          is also acquired by any <command>DELETE</command> on a row, and also by an
-         <command>UPDATE</command> that modifies the values on certain columns.  Currently,
+         <command>UPDATE</command> that modifies the values of certain columns.  Currently,
          the set of columns considered for the <command>UPDATE</command> case are those that
          have a unique index on them that can be used in a foreign key (so partial
          indexes and expressional indexes are not considered), but this may change
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index f5e3318106..06068f87a4 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -2837,7 +2837,7 @@ The commands accepted in replication mode are:
   <para>
    Every sent transaction contains zero or more DML messages (Insert,
    Update, Delete). In case of a cascaded setup it can also contain Origin
-   messages. The origin message indicated that the transaction originated on
+   messages. The origin message indicates that the transaction originated on
    different replication node. Since a replication node in the scope of logical
    replication protocol can be pretty much anything, the only identifier
    is the origin name. It's downstream's responsibility to handle this as
-- 
2.17.0

>From 28b8ab8aa7d37359e1323c0a2bfd14c7c0f49be7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 22:55:59 -0500
Subject: [PATCH v3 07/12] distro agnostic

---
 doc/src/sgml/sepgsql.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/sepgsql.sgml b/doc/src/sgml/sepgsql.sgml
index e896a44ce5..f7fa65da30 100644
--- a/doc/src/sgml/sepgsql.sgml
+++ b/doc/src/sgml/sepgsql.sgml
@@ -88,7 +88,7 @@ Policy from config file:        targeted
   <para>
    To build this module, include the option <literal>--with-selinux</literal> in
    your PostgreSQL <literal>configure</literal> command.  Be sure that the
-   <filename>libselinux-devel</filename> RPM is installed at build time.
+   <filename>libselinux-devel</filename> package is installed at build time.
   </para>
 
   <para>
@@ -177,7 +177,7 @@ $ for DBNAME in template0 template1 postgres; do
    Makefile on your system; the path shown below is only an example.
    (This Makefile is usually supplied by the
    <filename>selinux-policy-devel</filename> or
-   <filename>selinux-policy</filename> RPM.)
+   <filename>selinux-policy</filename> package.)
    Once built, install this policy package using the
    <command>semodule</command> command, which loads supplied policy packages
    into the kernel.  If the package is correctly installed,
-- 
2.17.0

>From fe9b51f8509ca19ad8106ec3382074d5ca01b01f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 22:24:14 -0500
Subject: [PATCH v3 08/12] style and consistency

---
 doc/src/sgml/indexam.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml
index 390c49eb6a..649020b7da 100644
--- a/doc/src/sgml/indexam.sgml
+++ b/doc/src/sgml/indexam.sgml
@@ -612,7 +612,7 @@ amgettuple (IndexScanDesc scan,
    will pass the caller's snapshot test.  On success, <function>amgettuple</function>
    must also set <literal>scan-&gt;xs_recheck</literal> to true or false.
    False means it is certain that the index entry matches the scan keys.
-   true means this is not certain, and the conditions represented by the
+   True means this is not certain, and the conditions represented by the
    scan keys must be rechecked against the heap tuple after fetching it.
    This provision supports <quote>lossy</quote> index operators.
    Note that rechecking will extend only to the scan conditions; a partial
-- 
2.17.0

>From 17a15942f395defb3592424c3a459bb66cc8fcbc Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 23:13:00 -0500
Subject: [PATCH v3 09/12] HAVING conditions cannot be repeated

---
 doc/src/sgml/ref/select.sgml      | 2 +-
 doc/src/sgml/ref/select_into.sgml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index b4dea9b6ac..472b7cae81 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -38,7 +38,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
     [ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
     [ WHERE <replaceable class="parameter">condition</replaceable> ]
     [ GROUP BY <replaceable class="parameter">grouping_element</replaceable> [, ...] ]
-    [ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
+    [ HAVING <replaceable class="parameter">condition</replaceable> ]
     [ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
     [ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
     [ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]
diff --git a/doc/src/sgml/ref/select_into.sgml b/doc/src/sgml/ref/select_into.sgml
index 6cfa706b57..7b327d9eee 100644
--- a/doc/src/sgml/ref/select_into.sgml
+++ b/doc/src/sgml/ref/select_into.sgml
@@ -28,7 +28,7 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="parameter">expression</replac
     [ FROM <replaceable class="parameter">from_item</replaceable> [, ...] ]
     [ WHERE <replaceable class="parameter">condition</replaceable> ]
     [ GROUP BY <replaceable class="parameter">expression</replaceable> [, ...] ]
-    [ HAVING <replaceable class="parameter">condition</replaceable> [, ...] ]
+    [ HAVING <replaceable class="parameter">condition</replaceable> ]
     [ WINDOW <replaceable class="parameter">window_name</replaceable> AS ( <replaceable class="parameter">window_definition</replaceable> ) [, ...] ]
     [ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <replaceable class="parameter">select</replaceable> ]
     [ ORDER BY <replaceable class="parameter">expression</replaceable> [ ASC | DESC | USING <replaceable class="parameter">operator</replaceable> ] [ NULLS { FIRST | LAST } ] [, ...] ]
-- 
2.17.0

>From a45e01b12fe44ab66835a54ddb9c51d318e6c14b Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Fri, 25 Sep 2020 09:20:03 -0500
Subject: [PATCH v3 10/12] doc: textsearch: grammar: exactly

Commit 028350f619f7688e0453fcd2c4b25abe9ba30fa7 changed from "at most" logic to
exactly, but the grammar was off.
---
 doc/src/sgml/textsearch.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index f4433b5c1f..a7c0948c02 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -1645,7 +1645,7 @@ SELECT to_tsquery('fat') &lt;-&gt; to_tsquery('cat | rat');
      <listitem>
       <para>
        Returns a query that searches for a match to the first given query
-       followed by a match to the second given query at a distance of at
+       followed by a match to the second given query at a distance of exactly
        <replaceable>distance</replaceable> lexemes, using
        the <literal>&lt;<replaceable>N</replaceable>&gt;</literal>
        <type>tsquery</type> operator.  For example:
-- 
2.17.0

>From affbd06095a7ca123b9c24f179bb5bbcd640cd9e Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 22 Sep 2020 23:34:54 -0500
Subject: [PATCH v3 11/12] fix tsquery example

wrong since bb140506df605fab58f48926ee1db1f80bdafb59
---
 doc/src/sgml/textsearch.sgml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index a7c0948c02..7bd8d53dc4 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -1623,9 +1623,9 @@ occurrences to display in the result.',
 
 <screen>
 SELECT to_tsquery('fat') &lt;-&gt; to_tsquery('cat | rat');
-             ?column?
------------------------------------
- 'fat' &lt;-&gt; 'cat' | 'fat' &lt;-&gt; 'rat'
+          ?column?
+----------------------------
+ 'fat' &lt;-&gt; ( 'cat' | 'rat' )
 </screen>
       </para>
      </listitem>
-- 
2.17.0

>From 5cfe84d985b8cb7697971b8ede59bdb474e087fb Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Fri, 25 Sep 2020 09:17:48 -0500
Subject: [PATCH v3 12/12] Fix omission regarding ALTER SEQUENCE

since 3d79013b970d4cc336c06eb77ed526b44308c03e

should backpatch to v10
---
 doc/src/sgml/ref/truncate.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml
index 5922ee579e..c8361e77bd 100644
--- a/doc/src/sgml/ref/truncate.sgml
+++ b/doc/src/sgml/ref/truncate.sgml
@@ -160,8 +160,8 @@ TRUNCATE [ TABLE ] [ ONLY ] <replaceable class="parameter">name</replaceable> [
    When <literal>RESTART IDENTITY</literal> is specified, the implied
    <command>ALTER SEQUENCE RESTART</command> operations are also done
    transactionally; that is, they will be rolled back if the surrounding
-   transaction does not commit.  This is unlike the normal behavior of
-   <command>ALTER SEQUENCE RESTART</command>.  Be aware that if any additional
+   transaction does not commit.
+   Be aware that if any additional
    sequence operations are done on the restarted sequences before the
    transaction rolls back, the effects of these operations on the sequences
    will be rolled back, but not their effects on <function>currval()</function>;
-- 
2.17.0

Reply via email to