get_graph_pattern_def() emitted the pattern-level WHERE keyword as "WHERE " with no leading space, so reverse-parsing produced output like "(o IS orders)WHERE (...)". The element-level WHERE deparse in get_path_pattern_expr_def() already prepends a separating space; the pattern-level branch was inconsistent with it. Emit " WHERE " to match. The output still re-parses to the same tree, so this is cosmetic. For test coverage, add a whole-pattern WHERE clause to the existing customers_us view, which is already reverse-parsed with pg_get_viewdef(). Author: Dhruv Chauhan <chauhandhruv351@gmail.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CANWwWcpHb0h7tg6otRnL-FV83jwQpAiyw1bhvv8T78kpwZ-0ow%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/.