Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d58ca1c

Browse files
author
Nikita Glukhov
committed
Fix docs structure for SQL/JSON query functions
1 parent c64bcaa commit d58ca1c

File tree

1 file changed

+33
-47
lines changed

1 file changed

+33
-47
lines changed

doc/src/sgml/func.sgml

Lines changed: 33 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17676,17 +17676,17 @@ FROM films AS f;
1767617676
</listitem>
1767717677
<listitem>
1767817678
<para>
17679-
<xref linkend="functions-jsonexists"/>
17679+
<link linkend="functions-jsonexists"><literal>JSON_EXISTS</literal></link>
1768017680
</para>
1768117681
</listitem>
1768217682
<listitem>
1768317683
<para>
17684-
<xref linkend="functions-jsonvalue"/>
17684+
<link linkend="functions-jsonvalue"><literal>JSON_VALUE</literal></link>
1768517685
</para>
1768617686
</listitem>
1768717687
<listitem>
1768817688
<para>
17689-
<xref linkend="functions-jsonquery"/>
17689+
<link linkend="functions-jsonquery"><literal>JSON_QUERY</literal></link>
1769017690
</para>
1769117691
</listitem>
1769217692
</itemizedlist>
@@ -17718,32 +17718,28 @@ INSERT INTO my_films VALUES (
1771817718
</programlisting>
1771917719
</para>
1772017720

17721-
<refentry id="functions-jsonexists">
17722-
<refnamediv>
17723-
<refname>JSON_EXISTS</refname>
17724-
<refpurpose>check whether a JSON path expression can return any SQL/JSON items</refpurpose>
17725-
</refnamediv>
17721+
<sect4 id="functions-jsonexists">
17722+
<title><literal>JSON_EXISTS</literal></title>
17723+
<indexterm><primary>json_exists</primary></indexterm>
1772617724

17727-
<refsynopsisdiv>
1772817725
<synopsis>
1772917726
<function>JSON_EXISTS</function> (
1773017727
<replaceable>context_item</replaceable>, <replaceable>path_expression</replaceable> <optional> PASSING { <replaceable>value</replaceable> AS <replaceable>varname</replaceable> } <optional>, ...</optional></optional>
1773117728
<optional> RETURNING <replaceable class="parameter">data_type</replaceable> </optional>
1773217729
<optional> { TRUE | FALSE | UNKNOWN | ERROR } ON ERROR </optional>
1773317730
)
1773417731
</synopsis>
17735-
</refsynopsisdiv>
1773617732

17737-
<refsect1>
17733+
<sect5>
1773817734
<title>Description</title>
1773917735

1774017736
<para>
1774117737
<function>JSON_EXISTS</function> function checks whether the provided
1774217738
<acronym>JSON</acronym> path expression can return any <acronym>SQL/JSON</acronym> items.
1774317739
</para>
17744-
</refsect1>
17740+
</sect5>
1774517741

17746-
<refsect1>
17742+
<sect5>
1774717743
<title>Parameters</title>
1774817744
<variablelist>
1774917745
<varlistentry>
@@ -17784,9 +17780,9 @@ INSERT INTO my_films VALUES (
1778417780
</varlistentry>
1778517781

1778617782
</variablelist>
17787-
</refsect1>
17783+
</sect5>
1778817784

17789-
<refsect1>
17785+
<sect5>
1779017786
<title>Examples</title>
1779117787

1779217788
<para>
@@ -17831,17 +17827,13 @@ SELECT JSON_EXISTS(jsonb '{"a": [1,2,3]}', 'strict $.a[5]');
1783117827
(1 row)
1783217828
</screen>
1783317829

17834-
</refsect1>
17835-
</refentry>
17830+
</sect5>
17831+
</sect4>
1783617832

17837-
<refentry id="functions-jsonvalue">
17838-
<refnamediv>
17839-
<refname>JSON_VALUE</refname>
17840-
<refpurpose>extract a value from JSON data and convert
17841-
it to an <acronym>SQL</acronym> scalar</refpurpose>
17842-
</refnamediv>
17833+
<sect4 id="functions-jsonvalue">
17834+
<title><literal>JSON_VALUE</literal></title>
17835+
<indexterm><primary>json_value</primary></indexterm>
1784317836

17844-
<refsynopsisdiv>
1784517837
<synopsis>
1784617838
<function>JSON_VALUE</function> (
1784717839
<replaceable>context_item</replaceable>, <replaceable>path_expression</replaceable> <optional> PASSING { <replaceable>value</replaceable> AS <replaceable>varname</replaceable> } <optional>, ...</optional></optional>
@@ -17850,9 +17842,8 @@ SELECT JSON_EXISTS(jsonb '{"a": [1,2,3]}', 'strict $.a[5]');
1785017842
<optional> { ERROR | NULL | DEFAULT <replaceable class="parameter">expression</replaceable> } ON ERROR </optional>
1785117843
)
1785217844
</synopsis>
17853-
</refsynopsisdiv>
1785417845

17855-
<refsect1>
17846+
<sect5>
1785617847
<title>Description</title>
1785717848

1785817849
<para>
@@ -17862,9 +17853,9 @@ SELECT JSON_EXISTS(jsonb '{"a": [1,2,3]}', 'strict $.a[5]');
1786217853
<acronym>SQL/JSON</acronym> item, an error occurs. To extract
1786317854
an <acronym>SQL/JSON</acronym> array or object, use <xref linkend="functions-jsonquery"/>.
1786417855
</para>
17865-
</refsect1>
17856+
</sect5>
1786617857

17867-
<refsect1>
17858+
<sect5>
1786817859
<title>Parameters</title>
1786917860

1787017861
<variablelist>
@@ -17932,9 +17923,9 @@ SELECT JSON_EXISTS(jsonb '{"a": [1,2,3]}', 'strict $.a[5]');
1793217923
</varlistentry>
1793317924

1793417925
</variablelist>
17935-
</refsect1>
17926+
</sect5>
1793617927

17937-
<refsect1>
17928+
<sect5>
1793817929
<title>Examples</title>
1793917930

1794017931
<para>
@@ -17993,17 +17984,13 @@ SELECT JSON_VALUE(jsonb '[1,2]', 'strict $[*]' DEFAULT 1 ON ERROR);
1799317984
1
1799417985
</screen>
1799517986

17996-
</refsect1>
17997-
</refentry>
17987+
</sect5>
17988+
</sect4>
1799817989

17999-
<refentry id="functions-jsonquery">
18000-
<refnamediv>
18001-
<refname>JSON_QUERY</refname>
18002-
<refpurpose>extract an SQL/JSON array or object from JSON data
18003-
and return a JSON string</refpurpose>
18004-
</refnamediv>
17990+
<sect4 id="functions-jsonquery">
17991+
<title><literal>JSON_QUERY</literal></title>
17992+
<indexterm><primary>json_query</primary></indexterm>
1800517993

18006-
<refsynopsisdiv>
1800717994
<synopsis>
1800817995
<function>JSON_QUERY</function> (
1800917996
<replaceable>context_item</replaceable>, <replaceable>path_expression</replaceable> <optional> PASSING { <replaceable>value</replaceable> AS <replaceable>varname</replaceable> } <optional>, ...</optional></optional>
@@ -18014,9 +18001,8 @@ SELECT JSON_VALUE(jsonb '[1,2]', 'strict $[*]' DEFAULT 1 ON ERROR);
1801418001
<optional> { ERROR | NULL | EMPTY { <optional> ARRAY </optional> | OBJECT } | DEFAULT <replaceable class="parameter">expression</replaceable> } ON ERROR </optional>
1801518002
)
1801618003
</synopsis>
18017-
</refsynopsisdiv>
1801818004

18019-
<refsect1>
18005+
<sect5>
1802018006
<title>Description</title>
1802118007

1802218008
<para>
@@ -18026,9 +18012,9 @@ SELECT JSON_VALUE(jsonb '[1,2]', 'strict $[*]' DEFAULT 1 ON ERROR);
1802618012
items, you must wrap the result using the <literal>WITH WRAPPER</literal> clause.
1802718013
To extract a single <acronym>SQL/JSON</acronym> value, you can use <xref linkend="functions-jsonvalue"/>.
1802818014
</para>
18029-
</refsect1>
18015+
</sect5>
1803018016

18031-
<refsect1>
18017+
<sect5>
1803218018
<title>Parameters</title>
1803318019

1803418020
<variablelist>
@@ -18159,9 +18145,9 @@ SELECT JSON_VALUE(jsonb '[1,2]', 'strict $[*]' DEFAULT 1 ON ERROR);
1815918145
</varlistentry>
1816018146

1816118147
</variablelist>
18162-
</refsect1>
18148+
</sect5>
1816318149

18164-
<refsect1>
18150+
<sect5>
1816518151
<title>Examples</title>
1816618152

1816718153
<para>
@@ -18224,8 +18210,8 @@ SELECT JSON_QUERY(jsonb '"aaa"', '$' RETURNING text OMIT QUOTES);
1822418210
aaa
1822518211
(1 row)
1822618212
</screen>
18227-
</refsect1>
18228-
</refentry>
18213+
</sect5>
18214+
</sect4>
1822918215

1823018216
<sect4 id="functions-isjson-predicate">
1823118217
<title><literal>IS JSON</literal></title>

0 commit comments

Comments
 (0)