From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Clarify the ra != rb case in compareJsonbContainers().
Date: Tue, 15 Jul 2025 22:21:25 +0000
Message-ID: <E1ubo1d-006TbO-1N@gemulon.postgresql.org> (raw)
Clarify the ra != rb case in compareJsonbContainers().
It's impossible to reach this case with either ra or rb being
WJB_DONE, because our earlier checks that the structure and
length of the inputs match should guarantee that we reach their
ends simultaneously. However, the comment completely fails to
explain this, and the Asserts don't cover it either. The comment
is pretty obscure anyway, so rewrite it, and extend the Asserts
to reject WJB_DONE.
This is only cosmetic, so no need for back-patch.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/0c623e8a204187b87b4736792398eaf1@postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2a3a3964328a0b6b0cb278ae6cb595772586d654
Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
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: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Clarify the ra != rb case in compareJsonbContainers().
In-Reply-To: <E1ubo1d-006TbO-1N@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox