From 8164ca17f7f53a363787c79370a28c455037f3f2 Mon Sep 17 00:00:00 2001 From: Taiki Koshino Date: Thu, 20 Aug 2026 10:52:17 +0900 Subject: [PATCH v2] doc: Reformat SELECT queries using GRAPH_TABLE The SELECT queries using GRAPH_TABLE in ddl.sgml and queries.sgml were written on single long lines, requiring horizontal scrolling. Break the queries across multiple lines to improve readability. --- doc/src/sgml/ddl.sgml | 12 ++++++++++-- doc/src/sgml/queries.sgml | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 160f4eebb35..1ca5027d57f 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -5824,7 +5824,11 @@ CREATE PROPERTY GRAPH myshop This graph could then be queried like this: -- get list of customers active today -SELECT customer_name FROM GRAPH_TABLE (myshop MATCH (c IS customers)-[IS customer_orders]->(o IS orders WHERE o.ordered_when = current_date) COLUMNS (c.name AS customer_name)); +SELECT customer_name FROM GRAPH_TABLE (myshop + MATCH (c IS customers) + -[IS customer_orders]-> + (o IS orders WHERE o.ordered_when = current_date) + COLUMNS (c.name AS customer_name)); corresponding approximately to this relational query: @@ -5888,7 +5892,11 @@ CREATE PROPERTY GRAPH myshop With this definition, we can write a query like this: -SELECT customer_name FROM GRAPH_TABLE (myshop MATCH (c IS customer)-[IS has_placed]->(o IS "order" WHERE o.ordered_when = current_date) COLUMNS (c.name AS customer_name)); +SELECT customer_name FROM GRAPH_TABLE (myshop + MATCH (c IS customer) + -[IS has_placed]-> + (o IS "order" WHERE o.ordered_when = current_date) + COLUMNS (c.name AS customer_name)); With the new labels the MATCH clause is now more intuitive. diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml index 3d729f983b5..44ec44df83c 100644 --- a/doc/src/sgml/queries.sgml +++ b/doc/src/sgml/queries.sgml @@ -2768,7 +2768,11 @@ SELECT * FROM t; Consider this example from : -- get list of customers active today -SELECT customer_name FROM GRAPH_TABLE (myshop MATCH (c IS customers)-[IS customer_orders]->(o IS orders WHERE o.ordered_when = current_date) COLUMNS (c.name AS customer_name)); +SELECT customer_name FROM GRAPH_TABLE (myshop + MATCH (c IS customers) + -[IS customer_orders]-> + (o IS orders WHERE o.ordered_when = current_date) + COLUMNS (c.name AS customer_name)); The graph query part happens inside the GRAPH_TABLE construct. As far as the rest of the query is concerned, this acts like a -- 2.52.0