doc: Reformat SELECT queries using GRAPH_TABLE
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253509psql -h localhost -U postgresBuilt from patchset v1 (message #1), August 23, 2026 at 07:17 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t253509_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t253509_1 && git checkout t253509_1Patchset v1 (message #1) is on t253509_1
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@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/