Commit 4fa1d89c authored by Tom Lane's avatar Tom Lane

Doc: clean up markup for jsonb_set and related functions.

The markup for optional parameters was neither correct nor consistent.
In passing, fix a spelling mistake.

Per report from Alex Macy.  Some of these mistakes are old, so
back-patch as appropriate.

Discussion: https://postgr.es/m/156953522258.1204.12736099368284950578@wrigleys.postgresql.org
parent 775578a4
...@@ -12497,7 +12497,7 @@ table2-mapping ...@@ -12497,7 +12497,7 @@ table2-mapping
<entry><literal>[{"f1":1},2,null,3]</literal></entry> <entry><literal>[{"f1":1},2,null,3]</literal></entry>
</row> </row>
<row> <row>
<entry><para><literal>jsonb_set(target jsonb, path text[], new_value jsonb<optional>, <parameter>create_missing</parameter> <type>boolean</type></optional>)</literal> <entry><para><literal>jsonb_set(target jsonb, path text[], new_value jsonb <optional>, create_missing boolean</optional>)</literal>
</para></entry> </para></entry>
<entry><para><type>jsonb</type></para></entry> <entry><para><type>jsonb</type></para></entry>
<entry> <entry>
...@@ -12505,10 +12505,10 @@ table2-mapping ...@@ -12505,10 +12505,10 @@ table2-mapping
with the section designated by <replaceable>path</replaceable> with the section designated by <replaceable>path</replaceable>
replaced by <replaceable>new_value</replaceable>, or with replaced by <replaceable>new_value</replaceable>, or with
<replaceable>new_value</replaceable> added if <replaceable>new_value</replaceable> added if
<replaceable>create_missing</replaceable> is true ( default is <replaceable>create_missing</replaceable> is true (default is
<literal>true</literal>) and the item <literal>true</literal>) and the item
designated by <replaceable>path</replaceable> does not exist. designated by <replaceable>path</replaceable> does not exist.
As with the path orientated operators, negative integers that As with the path oriented operators, negative integers that
appear in <replaceable>path</replaceable> count from the end appear in <replaceable>path</replaceable> count from the end
of JSON arrays. of JSON arrays.
</entry> </entry>
...@@ -12522,7 +12522,7 @@ table2-mapping ...@@ -12522,7 +12522,7 @@ table2-mapping
<row> <row>
<entry> <entry>
<para><literal> <para><literal>
jsonb_insert(target jsonb, path text[], new_value jsonb, <optional><parameter>insert_after</parameter> <type>boolean</type></optional>) jsonb_insert(target jsonb, path text[], new_value jsonb <optional>, insert_after boolean</optional>)
</literal></para> </literal></para>
</entry> </entry>
<entry><para><type>jsonb</type></para></entry> <entry><para><type>jsonb</type></para></entry>
...@@ -12537,7 +12537,7 @@ table2-mapping ...@@ -12537,7 +12537,7 @@ table2-mapping
designated by <replaceable>path</replaceable> is in JSONB object, designated by <replaceable>path</replaceable> is in JSONB object,
<replaceable>new_value</replaceable> will be inserted only if <replaceable>new_value</replaceable> will be inserted only if
<replaceable>target</replaceable> does not exist. As with the path <replaceable>target</replaceable> does not exist. As with the path
orientated operators, negative integers that appear in oriented operators, negative integers that appear in
<replaceable>path</replaceable> count from the end of JSON arrays. <replaceable>path</replaceable> count from the end of JSON arrays.
</entry> </entry>
<entry> <entry>
...@@ -12578,10 +12578,10 @@ table2-mapping ...@@ -12578,10 +12578,10 @@ table2-mapping
<row> <row>
<entry> <entry>
<para><literal> <para><literal>
jsonb_path_exists(target jsonb, path jsonpath [, vars jsonb [, silent bool]]) jsonb_path_exists(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
<para><literal> <para><literal>
jsonb_path_exists_tz(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_exists_tz(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
</entry> </entry>
<entry><type>boolean</type></entry> <entry><type>boolean</type></entry>
...@@ -12601,10 +12601,10 @@ table2-mapping ...@@ -12601,10 +12601,10 @@ table2-mapping
<row> <row>
<entry> <entry>
<para><literal> <para><literal>
jsonb_path_match(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_match(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
<para><literal> <para><literal>
jsonb_path_match_tz(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_match_tz(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
</entry> </entry>
<entry><type>boolean</type></entry> <entry><type>boolean</type></entry>
...@@ -12625,10 +12625,10 @@ table2-mapping ...@@ -12625,10 +12625,10 @@ table2-mapping
<row> <row>
<entry> <entry>
<para><literal> <para><literal>
jsonb_path_query(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_query(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
<para><literal> <para><literal>
jsonb_path_query_tz(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_query_tz(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
</entry> </entry>
<entry><type>setof jsonb</type></entry> <entry><type>setof jsonb</type></entry>
...@@ -12656,10 +12656,10 @@ table2-mapping ...@@ -12656,10 +12656,10 @@ table2-mapping
<row> <row>
<entry> <entry>
<para><literal> <para><literal>
jsonb_path_query_array(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_query_array(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
<para><literal> <para><literal>
jsonb_path_query_array_tz(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_query_array_tz(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
</entry> </entry>
<entry><type>jsonb</type></entry> <entry><type>jsonb</type></entry>
...@@ -12679,10 +12679,10 @@ table2-mapping ...@@ -12679,10 +12679,10 @@ table2-mapping
<row> <row>
<entry> <entry>
<para><literal> <para><literal>
jsonb_path_query_first(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_query_first(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
<para><literal> <para><literal>
jsonb_path_query_first_tz(target jsonb, path jsonpath [, vars jsonb, silent bool]) jsonb_path_query_first_tz(target jsonb, path jsonpath <optional>, vars jsonb <optional>, silent bool</optional></optional>)
</literal></para> </literal></para>
</entry> </entry>
<entry><type>jsonb</type></entry> <entry><type>jsonb</type></entry>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment