@@ -18604,15 +18604,16 @@ JSON_TABLE (
18604
18604
where <replaceable class="parameter">json_table_column</replaceable> is:
18605
18605
</phrase>
18606
18606
<replaceable>name</replaceable> <replaceable>type</replaceable> [ PATH <replaceable>json_path_specification</replaceable> ]
18607
+ [ { WITHOUT | WITH { CONDITIONAL | [UNCONDITIONAL] } } [ ARRAY ] WRAPPER ]
18608
+ [ { KEEP | OMIT } QUOTES [ ON SCALAR STRING ] ]
18607
18609
[ { ERROR | NULL | DEFAULT <replaceable>expression</replaceable> } ON EMPTY ]
18608
18610
[ { ERROR | NULL | DEFAULT <replaceable>expression</replaceable> } ON ERROR ]
18609
18611
| <replaceable>name</replaceable> <replaceable>type</replaceable> FORMAT <replaceable>json_representation</replaceable>
18610
18612
[ PATH <replaceable>json_path_specification</replaceable> ]
18611
- [ { WITHOUT | WITH { CONDITIONAL | [UNCONDITIONAL] } }
18612
- [ ARRAY ] WRAPPER ]
18613
+ [ { WITHOUT | WITH { CONDITIONAL | [UNCONDITIONAL] } } [ ARRAY ] WRAPPER ]
18613
18614
[ { KEEP | OMIT } QUOTES [ ON SCALAR STRING ] ]
18614
- [ { ERROR | NULL | EMPTY { ARRAY | OBJECT } } ON EMPTY ]
18615
- [ { ERROR | NULL | EMPTY { ARRAY | OBJECT } } ON ERROR ]
18615
+ [ { ERROR | NULL | EMPTY { ARRAY | OBJECT } | DEFAULT expression } ON EMPTY ]
18616
+ [ { ERROR | NULL | EMPTY { ARRAY | OBJECT } | DEFAULT expression } ON ERROR ]
18616
18617
| <replaceable>name</replaceable> <replaceable>type</replaceable> EXISTS [ PATH <replaceable>json_path_specification</replaceable> ]
18617
18618
[ { ERROR | TRUE | FALSE | UNKNOWN } ON ERROR ]
18618
18619
| NESTED PATH <replaceable>json_path_specification</replaceable> [ AS <replaceable>path_name</replaceable> ]
@@ -18718,7 +18719,7 @@ where <replaceable class="parameter">json_table_column</replaceable> is:
18718
18719
<para>
18719
18720
The <literal>COLUMNS</literal> clause defining the schema of the
18720
18721
constructed view. In this clause, you must specify all the columns
18721
- to be filled with SQL/JSON items. Only scalar column types are supported.
18722
+ to be filled with SQL/JSON items.
18722
18723
The <replaceable class="parameter">json_table_column</replaceable>
18723
18724
expression has the following syntax variants:
18724
18725
</para>
@@ -18746,11 +18747,22 @@ where <replaceable class="parameter">json_table_column</replaceable> is:
18746
18747
In this case, the column name must correspond to one of the
18747
18748
keys within the SQL/JSON item produced by the row pattern.
18748
18749
</para>
18750
+ <para>
18751
+ Internally, <xref linkend="functions-jsonvalue"/> and
18752
+ <xref linkend="functions-jsonquery"/> are used to produce resulting values.
18753
+ <xref linkend="functions-jsonquery"/> is used for JSON, array, and
18754
+ composite column types, <xref linkend="functions-jsonvalue"/> is used for
18755
+ other types.
18756
+ </para>
18749
18757
<para>
18750
18758
Optionally, you can add <literal>ON EMPTY</literal> and
18751
- <literal>ON ERROR</literal> clauses to define how to handle
18752
- missing values or structural errors. These clauses have the same syntax
18753
- and semantics as in <xref linkend="functions-jsonvalue"/>.
18759
+ <literal>ON ERROR</literal> clauses to define how to handle missing values
18760
+ or structural errors.
18761
+ <literal>WRAPPER</literal> and <literal>QUOTES</literal> clauses can only
18762
+ be used with JSON, array, and composite types.
18763
+ These clauses have the same syntax and semantics as in
18764
+ <xref linkend="functions-jsonvalue"/> and
18765
+ <xref linkend="functions-jsonquery"/>.
18754
18766
</para>
18755
18767
</listitem>
18756
18768
</varlistentry>
@@ -18777,6 +18789,10 @@ where <replaceable class="parameter">json_table_column</replaceable> is:
18777
18789
In this case, the column name must correspond to one of the
18778
18790
keys within the SQL/JSON item produced by the row pattern.
18779
18791
</para>
18792
+ <para>
18793
+ Internally, <xref linkend="functions-jsonquery"/> is used to produce
18794
+ resulting values.
18795
+ </para>
18780
18796
<para>
18781
18797
Optionally, you can add <literal>WRAPPER</literal>, <literal>QUOTES</literal>,
18782
18798
<literal>ON EMPTY</literal> and <literal>ON ERROR</literal> clauses
0 commit comments