agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Coerce GRAPH_TABLE pattern WHERE clauses to boolean
Date: Wed, 02 Sep 2026 19:14:38 +0000
Message-ID: <E1x1qPt-00000003DMK-2ouh@gemulon.postgresql.org> (raw)
Coerce GRAPH_TABLE pattern WHERE clauses to boolean
transformGraphElementPattern() and transformGraphPattern() ran their
WHERE clauses through transformExpr() without ever applying
coerce_to_boolean(), so a WHERE clause of any type was accepted and
its bare datum was used as the qual, which resulted in wrong results
without a diagnostic. Route both sites through
transformWhereClause(), like every other WHERE clause, and add
regression tests for the element-level and pattern-level cases.
Author: Ewan Young <kdbase.hack@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAON2xHNZUS8ZwzVEJFeRirsC_-7EJvdbwABSzdGaJ_DF9DvHoQ%40mai...
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/1c8c790ec104bbef338eb52a9dc17030cee7c82e
Modified Files
--------------
src/backend/parser/parse_graphtable.c | 7 +++++--
src/test/regress/expected/graph_table.out | 4 ++++
src/test/regress/sql/graph_table.sql | 2 ++
3 files changed, 11 insertions(+), 2 deletions(-)
view thread (2+ messages)
Message-ID: <E1x1qPt-00000003DMK-2ouh@gemulon.postgresql.org>
Permalink: ../E1x1qPt-00000003DMK-2ouh@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x1qPt-00000003DMK-2ouh@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Coerce GRAPH_TABLE pattern WHERE clauses to boolean
In-Reply-To: <E1x1qPt-00000003DMK-2ouh@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