public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: r314tive <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Kirk Parker <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Ambiguity in IS JSON description and logic
Date: Tue, 18 Nov 2025 17:37:21 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALCfnurPwdZU3T4tWeSAgn-JcVVqQdmDoMmO5DqHKi0QnS=-GA@mail.gmail.com>
References: <[email protected]>
	<CANwZ8r=qtW3EfrzMrEB=xRoxePmx=JLUC8MvEK68kRCrfrQ4_g@mail.gmail.com>
	<CANwZ8rmj7Mr_ZaZsfH5cx5uNzRZ91aHaRWe=ViJGO=U7rKjFCQ@mail.gmail.com>
	<CAKFQuwZY8XS7EaF9nqq77G+5cnxhiwcDqa7tcYs-HRh1Wj5YDQ@mail.gmail.com>
	<CALCfnurPwdZU3T4tWeSAgn-JcVVqQdmDoMmO5DqHKi0QnS=-GA@mail.gmail.com>

On Tue, 2025-11-18 at 16:55 +0500, r314tive wrote:
> Based on this discussion, I’ve prepared a small documentation patch that
> tries to clarify the behavior of the IS JSON ... UNIQUE KEYS clause.
> 
> The patch explains that:
> - the WITH/WITHOUT UNIQUE KEYS clause controls an additional test on
>   duplicate object keys,
> - WITH UNIQUE KEYS requires that no object contained in the expression
>   (recursively) have duplicate keys, and
> - WITHOUT UNIQUE KEYS, which is also the default, just disables this
>   additional test and does not require duplicates to be present.
> 
> Patch is attached.

I don't think that the patch is really an improvement.  To me, the original
wording contains all the important information.  The patch it somewhat
repetetive and contains unnecessary detail.  For example, I can see from
the syntax diagram that I can use WITHOUT UNIQUE KEYS, and I have no
trouble guessing what that means.

Perhaps it would be enough to add something like "*recursively* checks for
duplicate keys" or "checks for duplicate keys *on any nesting level*".

Yours,
Laurenz Albe






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Ambiguity in IS JSON description and logic
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox