Skip to content

Commit 96ef323

Browse files
committed
Revert SQL/JSON features
The reverts the following and makes some associated cleanups: commit f79b803: Common SQL/JSON clauses commit f4fb45d: SQL/JSON constructors commit 5f0adec: Make STRING an unreserved_keyword. commit 33a3776: IS JSON predicate commit 1a36bc9: SQL/JSON query functions commit 606948b: SQL JSON functions commit 49082c2: RETURNING clause for JSON() and JSON_SCALAR() commit 4e34747: JSON_TABLE commit fadb48b: PLAN clauses for JSON_TABLE commit 2ef6f11: Reduce running time of jsonb_sqljson test commit 14d3f24: Further improve jsonb_sqljson parallel test commit a6baa4b: Documentation for SQL/JSON features commit b46bcf7: Improve readability of SQL/JSON documentation. commit 112fdb3: Fix finalization for json_objectagg and friends commit fcdb35c: Fix transformJsonBehavior commit 4cd8717: Improve a couple of sql/json error messages commit f7a605f: Small cleanups in SQL/JSON code commit 9c3d25e: Fix JSON_OBJECTAGG uniquefying bug commit a79153b: Claim SQL standard compliance for SQL/JSON features commit a1e7616: Rework SQL/JSON documentation commit 8d9f963: Fix errors in copyfuncs/equalfuncs support for JSON node types. commit 3c633f3: Only allow returning string types or bytea from json_serialize commit 67b2670: expression eval: Fix EEOP_JSON_CONSTRUCTOR and EEOP_JSONEXPR size. The release notes are also adjusted. Backpatch to release 15. Discussion: https://postgr.es/m/40d2c882-bcac-19a9-754d-4299e1d87ac7@postgresql.org
1 parent c4e861b commit 96ef323

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+350
-16420
lines changed

doc/src/sgml/func.sgml

Lines changed: 6 additions & 1059 deletions
Large diffs are not rendered by default.

doc/src/sgml/keywords/sql2016-02-reserved.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ INTERVAL
157157
INTO
158158
IS
159159
JOIN
160-
JSON
161160
JSON_ARRAY
162161
JSON_ARRAYAGG
163162
JSON_EXISTS

doc/src/sgml/release-15.sgml

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,99 +2054,6 @@ Author: Tom Lane <tgl@sss.pgh.pa.us>
20542054

20552055
</itemizedlist>
20562056

2057-
<sect4>
2058-
<title><acronym>JSON</acronym></title>
2059-
2060-
<itemizedlist>
2061-
2062-
<!--
2063-
Author: Andrew Dunstan <andrew@dunslane.net>
2064-
2022-03-27 [f79b803dc] Common SQL/JSON clauses
2065-
Author: Andrew Dunstan <andrew@dunslane.net>
2066-
2022-03-27 [f4fb45d15] SQL/JSON constructors
2067-
Author: Andrew Dunstan <andrew@dunslane.net>
2068-
2022-03-30 [606948b05] SQL JSON functions
2069-
Author: Andrew Dunstan <andrew@dunslane.net>
2070-
2022-03-31 [49082c2cc] RETURNING clause for JSON() and JSON_SCALAR()
2071-
Author: Andrew Dunstan <andrew@dunslane.net>
2072-
2022-04-07 [a6baa4bad] Documentation for SQL/JSON features
2073-
-->
2074-
2075-
<listitem>
2076-
<para>
2077-
Add <acronym>SQL</acronym>/<acronym>JSON</acronym>-standard
2078-
<acronym>JSON</acronym> constructors (Nikita Glukhov)
2079-
</para>
2080-
2081-
<para>
2082-
The construction functions are <link
2083-
linkend="functions-sqljson-producing"><function>json()</function></link>,
2084-
<function>json_scalar()</function>, and
2085-
<function>json_serialize()</function>,
2086-
<function>json_array()</function>,
2087-
<function>json_arrayagg()</function>,
2088-
<function>json_object()</function>, and
2089-
<function>json_objectagg()</function>. They have a few functional
2090-
advantages over the existing JSON functions.
2091-
</para>
2092-
</listitem>
2093-
2094-
<!--
2095-
Author: Andrew Dunstan <andrew@dunslane.net>
2096-
2022-03-29 [1a36bc9db] SQL/JSON query functions
2097-
-->
2098-
2099-
<listitem>
2100-
<para>
2101-
Add <acronym>SQL</acronym>/<acronym>JSON</acronym>
2102-
query functions <link
2103-
linkend="functions-sqljson-querying"><function>json_exists()</function></link>,
2104-
<function>json_query()</function>, and
2105-
<function>json_value()</function> (Nikita Glukhov)
2106-
</para>
2107-
</listitem>
2108-
2109-
<!--
2110-
Author: Andrew Dunstan <andrew@dunslane.net>
2111-
2022-03-28 [33a377608] IS JSON predicate
2112-
-->
2113-
2114-
<listitem>
2115-
<para>
2116-
Add <acronym>JSON</acronym> predicates to test
2117-
<type>JSON</type>/<type>JSONB</type> values (Nikita Glukhov)
2118-
</para>
2119-
2120-
<para>
2121-
The clauses are <link linkend="functions-sqljson-misc"><literal>IS
2122-
JSON</literal></link> [ <literal>VALUE</literal> |
2123-
<literal>ARRAY</literal>
2124-
| <literal>OBJECT</literal> | <literal>SCALAR</literal> |
2125-
[<literal>WITH</literal> | <literal>WITHOUT</literal> ]
2126-
<literal>UNIQUE KEYS</literal> ].
2127-
</para>
2128-
</listitem>
2129-
2130-
<!--
2131-
Author: Andrew Dunstan <andrew@dunslane.net>
2132-
2022-04-04 [4e34747c8] JSON_TABLE
2133-
Author: Andrew Dunstan <andrew@dunslane.net>
2134-
2022-04-05 [fadb48b00] PLAN clauses for JSON_TABLE
2135-
-->
2136-
2137-
<listitem>
2138-
<para>
2139-
Add function <link
2140-
linkend="functions-sqljson-table"><function>JSON_TABLE()</function></link>
2141-
to cause <acronym>JSON</acronym> data to be treated as a table
2142-
(Nikita Glukhov)
2143-
</para>
2144-
</listitem>
2145-
2146-
</itemizedlist>
2147-
2148-
</sect4>
2149-
21502057
</sect3>
21512058

21522059
<sect3>

src/backend/catalog/sql_features.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -527,28 +527,28 @@ T652 SQL-dynamic statements in SQL routines NO
527527
T653 SQL-schema statements in external routines YES
528528
T654 SQL-dynamic statements in external routines NO
529529
T655 Cyclically dependent routines YES
530-
T811 Basic SQL/JSON constructor functions YES
531-
T812 SQL/JSON: JSON_OBJECTAGG YES
532-
T813 SQL/JSON: JSON_ARRAYAGG with ORDER BY YES
533-
T814 Colon in JSON_OBJECT or JSON_OBJECTAGG YES
534-
T821 Basic SQL/JSON query operators YES
535-
T822 SQL/JSON: IS JSON WITH UNIQUE KEYS predicate YES
536-
T823 SQL/JSON: PASSING clause YES
537-
T824 JSON_TABLE: specific PLAN clause YES
538-
T825 SQL/JSON: ON EMPTY and ON ERROR clauses YES
539-
T826 General value expression in ON ERROR or ON EMPTY clauses YES
540-
T827 JSON_TABLE: sibling NESTED COLUMNS clauses YES
541-
T828 JSON_QUERY YES
542-
T829 JSON_QUERY: array wrapper options YES
543-
T830 Enforcing unique keys in SQL/JSON constructor functions YES
530+
T811 Basic SQL/JSON constructor functions NO
531+
T812 SQL/JSON: JSON_OBJECTAGG NO
532+
T813 SQL/JSON: JSON_ARRAYAGG with ORDER BY NO
533+
T814 Colon in JSON_OBJECT or JSON_OBJECTAGG NO
534+
T821 Basic SQL/JSON query operators NO
535+
T822 SQL/JSON: IS JSON WITH UNIQUE KEYS predicate NO
536+
T823 SQL/JSON: PASSING clause NO
537+
T824 JSON_TABLE: specific PLAN clause NO
538+
T825 SQL/JSON: ON EMPTY and ON ERROR clauses NO
539+
T826 General value expression in ON ERROR or ON EMPTY clauses NO
540+
T827 JSON_TABLE: sibling NESTED COLUMNS clauses NO
541+
T828 JSON_QUERY NO
542+
T829 JSON_QUERY: array wrapper options NO
543+
T830 Enforcing unique keys in SQL/JSON constructor functions NO
544544
T831 SQL/JSON path language: strict mode YES
545545
T832 SQL/JSON path language: item method YES
546546
T833 SQL/JSON path language: multiple subscripts YES
547547
T834 SQL/JSON path language: wildcard member accessor YES
548548
T835 SQL/JSON path language: filter expressions YES
549549
T836 SQL/JSON path language: starts with predicate YES
550550
T837 SQL/JSON path language: regex_like predicate YES
551-
T838 JSON_TABLE: PLAN DEFAULT clause YES
551+
T838 JSON_TABLE: PLAN DEFAULT clause NO
552552
T839 Formatted cast of datetimes to/from character strings NO
553553
M001 Datalinks NO
554554
M002 Datalinks via SQL/CLI NO

src/backend/commands/explain.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3830,13 +3830,7 @@ ExplainTargetRel(Plan *plan, Index rti, ExplainState *es)
38303830
break;
38313831
case T_TableFuncScan:
38323832
Assert(rte->rtekind == RTE_TABLEFUNC);
3833-
if (rte->tablefunc)
3834-
if (rte->tablefunc->functype == TFT_XMLTABLE)
3835-
objectname = "xmltable";
3836-
else /* Must be TFT_JSON_TABLE */
3837-
objectname = "json_table";
3838-
else
3839-
objectname = NULL;
3833+
objectname = "xmltable";
38403834
objecttag = "Table Function Name";
38413835
break;
38423836
case T_ValuesScan:

0 commit comments

Comments
 (0)