From 8164ca17f7f53a363787c79370a28c455037f3f2 Mon Sep 17 00:00:00 2001
From: Taiki Koshino <koshio@sraoss.co.jp>
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:
 <programlisting>
 -- 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));
 </programlisting>
    corresponding approximately to this relational query:
 <programlisting>
@@ -5888,7 +5892,11 @@ CREATE PROPERTY GRAPH myshop
   <para>
    With this definition, we can write a query like this:
 <programlisting>
-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));
 </programlisting>
    With the new labels the <literal>MATCH</literal> clause is now more intuitive.
   </para>
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 <xref linkend="ddl-property-graphs"/>:
 <programlisting>
 -- 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));
 </programlisting>
     The graph query part happens inside the <literal>GRAPH_TABLE</literal>
     construct.  As far as the rest of the query is concerned, this acts like a
-- 
2.52.0

