pgsql: Fix incorrect comment in JsonTablePlanJoinNextRow()

From: Amit Langote <amitlan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix incorrect comment in JsonTablePlanJoinNextRow()
Date: 2026-04-16 04:41:55
Message-ID: E1wDEY7-001C2T-0W@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)qq(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://postgr.es/m/tencent_4CC6316F02DECA61ACCF22F933FEA5C12806@qq.com
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1a2d60cc0410c19484a389aee5dc41d28541b0f8

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

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2026-04-16 04:42:09 pgsql: Fix incorrect comment in JsonTablePlanJoinNextRow()
Previous Message Fujii Masao 2026-04-16 03:49:58 Re: pgsql: ssl: Serverside SNI support for libpq