fixes for typos and tags in REL_12_STABLE

Liudmila Mantrova <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.documentation
Message-ID <CAEkD-mDUZrRE=k-FznEg4Ed2VdjpZCyHoyo+p0+8KvHqR=pNVQ@mail.gmail.com>
Hi,

Please consider these small patches for REL_12_STABLE that mainly fix
remaining typos and some tagging issues. The jsonpath-related one also
improves some wordings, e.g. there seems to be no need to separate Boolean
operators with spaces in path definitions.

-- 
Best regards,
Liudmila Mantrova

Technical writer at Postgres Professional: http://www.postgrespro.com
jsonpath-doc-fixes.patch (text/x-patch, 8.2 KB)
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 0d6d883dbf..829ad07a90 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -11544,7 +11544,7 @@ table2-mapping
 
   <para>JSON query functions and operators
    pass the provided path expression to the <firstterm>path engine</firstterm>
-   for evaluation. If the expression matches the JSON data to be queried,
+   for evaluation. If the expression matches the queried JSON data,
    the corresponding SQL/JSON item is returned.
    Path expressions are written in the SQL/JSON path language
    and can also include arithmetic expressions and functions.
@@ -11604,7 +11604,7 @@ table2-mapping
 
   <para>
    If the item to retrieve is an element of an array, you have
-   to unnest this array using the [*] operator. For example,
+   to unnest this array using the <literal>[*]</literal> operator. For example,
    the following path will return location coordinates for all
    the available track segments:
 <programlisting>
@@ -11625,8 +11625,7 @@ table2-mapping
    The result of each path evaluation step can be processed
    by one or more <type>jsonpath</type> operators and methods
    listed in <xref linkend="functions-sqljson-path-operators"/>.
-   Each method must be preceded by a dot, while arithmetic and Boolean
-   operators are separated from the operands by spaces. For example,
+   Each method name must be preceded by a dot. For example,
    you can get an array size:
 <programlisting>
 '$.track.segments.size()'
@@ -11907,7 +11906,7 @@ table2-mapping
        </row>
        <row>
         <entry><literal>double()</literal></entry>
-        <entry>Approximate numeric value converted from a string</entry>
+        <entry>Approximate floating-point number converted from an SQL/JSON number or a string</entry>
         <entry><literal>{"len": "1.9"}</literal></entry>
         <entry><literal>$.len.double() * 2</literal></entry>
         <entry><literal>3.8</literal></entry>
@@ -11936,10 +11935,10 @@ table2-mapping
        <row>
         <entry><literal>keyvalue()</literal></entry>
         <entry>
-          Sequence of object's key-value pairs represented as array of objects
+          Sequence of object's key-value pairs represented as array of items
           containing three fields (<literal>"key"</literal>,
           <literal>"value"</literal>, and <literal>"id"</literal>).
-          <literal>"id"</literal> is an unique identifier of the object
+          <literal>"id"</literal> is a unique identifier of the object
           key-value pair belongs to.
         </entry>
         <entry><literal>{"x": "20", "y": 32}</literal></entry>
@@ -12061,9 +12060,9 @@ table2-mapping
         <entry><literal>like_regex</literal></entry>
         <entry>
           Tests pattern matching with POSIX regular expressions
-          (<xref linkend="functions-posix-regexp"/>).  Supported flags
+          (see <xref linkend="functions-posix-regexp"/>).  Supported flags
           are <literal>i</literal>, <literal>s</literal>, <literal>m</literal>,
-          <literal>x</literal> and <literal>q</literal>.</entry>
+          <literal>x</literal>, and <literal>q</literal>.</entry>
         <entry><literal>["abc", "abd", "aBdC", "abdacb", "babc"]</literal></entry>
         <entry><literal>$[*] ? (@ like_regex "^ab.*c" flag "i")</literal></entry>
         <entry><literal>"abc", "aBdC", "abdacb"</literal></entry>
@@ -12077,7 +12076,7 @@ table2-mapping
        </row>
        <row>
         <entry><literal>exists</literal></entry>
-        <entry>Tests whether a path expression has at least one SQL/JSON item</entry>
+        <entry>Tests whether a path expression matches at least one SQL/JSON item</entry>
         <entry><literal>{"x": [1, 2], "y": [2, 4]}</literal></entry>
         <entry><literal>strict $.* ? (exists (@ ? (@[*] > 2)))</literal></entry>
         <entry><literal>2, 4</literal></entry>
@@ -12302,10 +12301,9 @@ table2-mapping
        <row>
         <entry><literal>@@</literal></entry>
         <entry><type>jsonpath</type></entry>
-        <entry>JSON path predicate check result for the specified JSON value.
-        Only first result item is taken into account.  If there are no results
-        or the first result item is not Boolean, then null
-        is returned.</entry>
+        <entry>Returns the result of JSON path predicate check for the specified JSON value.
+        Only the first item of the result is taken into account.  If the
+        result is not Boolean, then <literal>null</literal> is returned.</entry>
         <entry><literal>'{"a":[1,2,3,4,5]}'::jsonb @@ '$.a[*] > 2'</literal></entry>
        </row>
       </tbody>
@@ -12943,7 +12941,7 @@ table2-mapping
        <row>
         <entry>
          <para><literal>
-           jsonb_path_exists(target jsonb, path jsonpath [, vars jsonb, silent bool])
+           jsonb_path_exists(target jsonb, path jsonpath [, vars jsonb [, silent bool]])
          </literal></para>
         </entry>
         <entry><type>boolean</type></entry>
@@ -12968,10 +12966,9 @@ table2-mapping
         </entry>
         <entry><type>boolean</type></entry>
         <entry>
-          Returns JSON path predicate result for the specified JSON value.
-          Only first result item is taken into account.  If there are no results
-          or the first result item is not Boolean, then null
-          is returned.
+          Returns the result of JSON path predicate check for the specified JSON value.
+          Only the first item of the result is taken into account.  If the
+          result is not Boolean, then <literal>null</literal> is returned.
         </entry>
         <entry>
          <para><literal>
@@ -13178,18 +13175,18 @@ table2-mapping
   <note>
    <para>
     The <literal>jsonb_path_exists</literal>, <literal>jsonb_path_match</literal>,
-    <literal>jsonb_path_query</literal>, <literal>jsonb_path_query_array</literal> and
+    <literal>jsonb_path_query</literal>, <literal>jsonb_path_query_array</literal>, and
     <literal>jsonb_path_query_first</literal>
     functions have optional <literal>vars</literal> and <literal>silent</literal>
     arguments.
    </para>
    <para>
-    If the <literal>vars</literal> argument is specified, it provides an
+    If the <parameter>vars</parameter> argument is specified, it provides an
     object containing named variables to be substituted into a
     <literal>jsonpath</literal> expression.
    </para>
    <para>
-    If the <literal>silent</literal> argument is specified and has the
+    If the <parameter>silent</parameter> argument is specified and has the
     <literal>true</literal> value, these functions suppress the same errors
     as the <literal>@?</literal> and <literal>@@</literal> operators.
    </para>
diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml
index 2d2f404b73..4f566a4c8d 100644
--- a/doc/src/sgml/json.sgml
+++ b/doc/src/sgml/json.sgml
@@ -490,11 +490,11 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] == "qui"';
 SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] ? (@ == "qui")';
 </programlisting>
     GIN index extracts statements of following form out of
-    <literal>jsonpath</literal>: <literal>accessors_chain = const</literal>.
+    <literal>jsonpath</literal>: <replaceable>accessors_chain</replaceable> = <replaceable>const</replaceable>.
     Accessors chain may consist of <literal>.key</literal>,
-    <literal>[*]</literal> and <literal>[index]</literal> accessors.
+    <literal>[*]</literal>, and <literal>[<replaceable>index</replaceable>]</literal> accessors.
     <literal>jsonb_ops</literal> additionally supports <literal>.*</literal>
-    and <literal>.**</literal> statements.
+    and <literal>.**</literal> accessors.
   </para>
   <para>
     Another approach to querying is to exploit containment, for example:
@@ -650,12 +650,12 @@ SELECT jdoc-&gt;'guid', jdoc-&gt;'name' FROM api WHERE jdoc @&gt; '{"tags": ["qu
   <itemizedlist>
    <listitem>
     <para>
-     Dot <literal>.</literal> is used for member access.
+     Dot (<literal>.</literal>) is used for member access.
     </para>
    </listitem>
    <listitem>
     <para>
-     Square brackets <literal>[]</literal> are used for array access.
+     Square brackets (<literal>[]</literal>) are used for array access.
     </para>
    </listitem>
    <listitem>
v12-typos.patch (text/x-patch, 2.6 KB)
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index a2a46c6ab3..4f5a99c034 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -887,7 +887,7 @@ CREATE COLLATION french FROM "fr-x-icu";
    </sect3>
 
    <sect3 id="collation-nondeterministic">
-    <title>Nondeterminstic Collations</title>
+    <title>Nondeterministic Collations</title>
 
     <para>
      A collation is either <firstterm>deterministic</firstterm> or
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 89284dc5c0..acc08acba6 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -188,7 +188,7 @@ shared_buffers = 128MB
      a <productname>PostgreSQL</productname> data directory contains a file
      <filename>postgresql.auto.conf</filename><indexterm><primary>postgresql.auto.conf</primary></indexterm>,
      which has the same format as <filename>postgresql.conf</filename> but
-     is intended to be edited automatically not manually.  This file holds
+     is intended to be edited automatically, not manually.  This file holds
      settings provided through the <xref linkend="sql-altersystem"/> command.
      This file is read whenever <filename>postgresql.conf</filename> is,
      and its settings take effect in the same way.  Settings
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 6035c97515..4eba178ffb 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -20558,7 +20558,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
         (<parameter>slot_name</parameter> <type>name</type>, <parameter>lsn</parameter> <type>pg_lsn</type>)
        </entry>
        <entry>
-        Copies an existing physical replication slot name <parameter>src_slot_name</parameter>
+        Copies an existing physical replication slot named <parameter>src_slot_name</parameter>
         to a physical replication slot named <parameter>dst_slot_name</parameter>.
         The copied physical slot starts to reserve WAL from the same <acronym>LSN</acronym> as the
         source slot.
@@ -21665,7 +21665,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
    <para>
     <function>pg_ls_archive_statusdir</function> returns the name, size, and
     last modified time (mtime) of each file in the WAL archive status
-    directory <literal>pg_wal/archive_status</literal>. By default only
+    directory <filename>pg_wal/archive_status</filename>. By default only
     superusers and members of the <literal>pg_monitor</literal> role can
     use this function. Access may be granted to others using
     <command>GRANT</command>.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.