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%40mail.gmail.com
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/19/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/19/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.