0001-doc-Clarify-IS-JSON-UNIQUE-KEYS-behavior.patch
application/octet-stream
Filename: 0001-doc-Clarify-IS-JSON-UNIQUE-KEYS-behavior.patch
Type: application/octet-stream
Part: 0
From ce0689941679c55bb22c4a9206fb792fa2dd909e Mon Sep 17 00:00:00 2001
From: ilmar yunusov <tanswis42@gmail.com>
Date: Tue, 18 Nov 2025 16:30:22 +0500
Subject: [PATCH] doc: Clarify IS JSON UNIQUE KEYS behavior
---
doc/src/sgml/func/func-json.sgml | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/doc/src/sgml/func/func-json.sgml b/doc/src/sgml/func/func-json.sgml
index 1ec73cff464..ccb23dcdcb2 100644
--- a/doc/src/sgml/func/func-json.sgml
+++ b/doc/src/sgml/func/func-json.sgml
@@ -893,10 +893,15 @@
parsed as JSON, possibly of a specified type.
If <literal>SCALAR</literal> or <literal>ARRAY</literal> or
<literal>OBJECT</literal> is specified, the
- test is whether or not the JSON is of that particular type. If
- <literal>WITH UNIQUE KEYS</literal> is specified, then any object in the
- <replaceable>expression</replaceable> is also tested to see if it
- has duplicate keys.
+ test is whether or not the JSON is of that particular type.
+ The optional <literal>WITH</literal> or <literal>WITHOUT</literal>
+ <literal>UNIQUE KEYS</literal> clause controls an additional test
+ on duplicate object keys. Specifying <literal>WITH UNIQUE KEYS</literal>
+ requires that no object contained in the
+ <replaceable>expression</replaceable> (recursively) have duplicate keys.
+ Specifying <literal>WITHOUT UNIQUE KEYS</literal>, which is also the
+ default, disables this additional test; it does not require duplicate
+ keys to be present.
</para>
<para>
<programlisting>
--
2.52.0