| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix missing space before WHERE in GRAPH_TABLE deparse |
| Date: | 2026-08-03 08:33:05 |
| Message-ID: | E1wqo6b-00000001TFV-091w@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix missing space before WHERE in GRAPH_TABLE deparse
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(at)gmail(dot)com>
Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/CANWwWcpHb0h7tg6otRnL-FV83jwQpAiyw1bhvv8T78kpwZ-0ow%40mail.gmail.com
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d2ac26eb9b1e8ad19fd526efb0ffff4fae5ed56f
Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 2 +-
src/test/regress/expected/graph_table.out | 21 +++++++++++----------
src/test/regress/sql/graph_table.sql | 5 +++--
3 files changed, 15 insertions(+), 13 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-08-03 10:05:30 | pgsql: doc: Clarify VERBOSE output for ANALYZE and VACUUM |
| Previous Message | Richard Guo | 2026-08-03 06:53:58 | pgsql: Fix nullability check for a sub-select's upper-level Vars |