> Splitting the path pattern across three lines is really necessary?
> Even without doing that, the full MATCH line would still be around
> 90–100 characters, which seems readable enough.
>
> There is another nearby GRAPH_TABLE example in queries.sgml that
> uses a different formatting style. If this patch is also intended to
> establish a clearer formatting style for GRAPH_TABLE examples,
> isn't it better to adjust that example as well?

Hi,

I agree that splitting the path pattern into three lines wasn't really 
necessary;
even without it, the MATCH line stays around 90 to 100 characters, which is 
readable enough.
I've put together a patch that keeps GRAPH_TABLE ( on the opening line,
MATCH on one line, and COLUMNS on another,
and applied the same style to the other GRAPH_TABLE examples
in ddl.sgml and queries.sgml for consistency, for example:

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));

Separately, I noticed the relational query below the first GRAPH_TABLE example
in ddl.sgml is also quite long (about 150 characters).
I wonder if it's worth breaking that one too, maybe right before WHERE, like:

SELECT customers.name FROM customers JOIN customer_orders USING (customer_id) 
JOIN orders USING (order_id)
    WHERE orders.ordered_when = current_date;

I wasn't sure whether this should be part of the same patch,
so I've attached two versions: v3 leaves it untouched,
and v4 includes the change. Let me know which you'd prefer.

Regards,
Taiki Koshino


Taiki Koshino<[email protected]>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/


________________________________

On Tue, Aug 25, 2026 at 10:33 AM Koshino Taiki <[email protected]> wrote:
> I put together a v2 patch that follows the approach you suggested:
> keeping GRAPH_TABLE ( on the opening line, moving the whole MATCH
> clause to its own line, and putting COLUMNS on another line, for example:
>
> 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));

Splitting the path pattern across three lines is really necessary?
Even without doing that, the full MATCH line would still be around
90–100 characters, which seems readable enough.

There is another nearby GRAPH_TABLE example in queries.sgml that
uses a different formatting style. If this patch is also intended to
establish a clearer formatting style for GRAPH_TABLE examples,
isn't it better to adjust that example as well?

Regards,

--
Fujii Masao

Attachment: v4-0001-doc-Reformat-SELECT-queries-using-GRAPH_TABLE.patch
Description: v4-0001-doc-Reformat-SELECT-queries-using-GRAPH_TABLE.patch

Attachment: v3-0001-doc-Reformat-SELECT-queries-using-GRAPH_TABLE.patch
Description: v3-0001-doc-Reformat-SELECT-queries-using-GRAPH_TABLE.patch

Reply via email to