From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix empty FOREIGN_JOIN sublist validation
Date: Thu, 27 Aug 2026 18:46:15 +0000
Message-ID: <E1wzf78-00000002NXG-1rh6@gemulon.postgresql.org> (raw)
Fix empty FOREIGN_JOIN sublist validation
FOREIGN_JOIN target sublists must contain at least two relation
identifiers. However, the parser checked only for sublists with
exactly one identifier, so FOREIGN_JOIN(()) was accepted.
Reject sublists with fewer than two relation identifiers, and add
regression coverage.
Author: Chao Li <lic@highgo.com>
Discussion: http://postgr.es/m/BEDC04E0-6732-4310-95BA-6EC34BC1442C@gmail.com
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/400c810ddbd7890f751913977e4442d71a0ebfc4
Modified Files
--------------
contrib/pg_plan_advice/expected/syntax.out | 3 +++
contrib/pg_plan_advice/pgpa_parser.y | 2 +-
contrib/pg_plan_advice/sql/syntax.sql | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
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: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix empty FOREIGN_JOIN sublist validation
In-Reply-To: <E1wzf78-00000002NXG-1rh6@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