| From: | Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | doc: Reformat SELECT queries using GRAPH_TABLE |
| Date: | 2026-08-21 07:05:32 |
| Message-ID: | OS9P286MB64860BD6CD6D4B4B0E1CEDE894A32@OS9P286MB6486.JPNP286.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
The SELECT queries using GRAPH_TABLE in ddl.sgml and queries.sgml
were written on single long lines, requiring horizontal scrolling.
This patch breaks the queries across multiple lines to improve
readability. This is also consistent with the CREATE PROPERTY GRAPH
statement in the PostgreSQL documentation, which is already formatted
across multiple lines:
https://www.postgresql.org/docs/19/ddl-property-graphs.html
For the placement and indentation of the line breaks in the
GRAPH_TABLE queries, I referred to the example in the "Property Graph
Queries" section of Peter Eisentraut's SQL:2023 overview:
https://peter.eisentraut.org/blog/2023/04/04/sql-2023-is-finished-here-is-whats-new
The example is formatted as follows:
SELECT owner_name,
SUM(amount) AS total_transacted
FROM financial_transactions GRAPH_TABLE (
MATCH (p:person WHERE p.name = 'Alice')
-[:ownerof]-> (:account)
-[t:transaction]- (:account)
<-[:ownerof]- (owner:person|company)
COLUMNS (owner.name AS owner_name, t.amount AS amount)
) AS ft
GROUP BY owner_name;
Best regards,
Taiki Koshino
Taiki Koshino<koshino(at)sraoss(dot)co(dot)jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-doc-Reformat-SELECT-queries-using-GRAPH_TABLE.patch | application/octet-stream | 2.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-08-21 07:15:23 | Re: use of SPI by postgresImportForeignStatistics |
| Previous Message | Fujii Masao | 2026-08-21 07:00:48 | Re: [PATCH] doc: clarify AS requirement when VALUES used in a FROM clause |