agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Amit Langote <amitlan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix incorrect comment in JsonTablePlanJoinNextRow()
Date: Thu, 16 Apr 2026 04:42:09 +0000
Message-ID: <E1wDEYL-001C3P-0i@gemulon.postgresql.org> (raw)

Fix incorrect comment in JsonTablePlanJoinNextRow()

The comment on the return-false path when both UNION siblings are
exhausted said "there are more rows," which is the opposite of what
the code does. The code itself is correct, returning false to signal
no more rows, but the misleading comment could tempt a reader into
"fixing" the return value, which would cause UNION plans to loop
indefinitely.

Back-patch to 17, where JSON_TABLE was introduced.

Author: Chuanwen Hu <463945512@qq.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/tencent_4CC6316F02DECA61ACCF22F933FEA5C12806@qq.com
Backpatch-through: 17

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f3fb145a0adb2c0ae34f4e36cf55bb1d60df3ddd

Modified Files
--------------
src/backend/utils/adt/jsonpath_exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1wDEYL-001C3P-0i@gemulon.postgresql.org>
Permalink:  ../E1wDEYL-001C3P-0i@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wDEYL-001C3P-0i@gemulon.postgresql.org

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: pgsql-committers@postgresql.org
  Cc: amitlan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix incorrect comment in JsonTablePlanJoinNextRow()
  In-Reply-To: <E1wDEYL-001C3P-0i@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox