Skip to content
select * from depesz;·

PostgreSQL 19 SQL/PGQ Patch Rolled Back Amid Syntax Questions

Waiting for PostgreSQL 19 – SQL Property Graph Queries (SQL/PGQ)

Key Takeaway

The SQL/PGQ implementation proposed for PostgreSQL 19 has been rolled back. It would have added GRAPH_TABLE, property-graph DDL, new catalogs and information-schema views, psql \dG, and pg_get_propgraphdef(), while the author questions its practical advantages over ordinary joins.

Why It Matters

The post documents SQL/PGQ’s proposed design and rollback while presenting a practitioner’s concrete questions about its syntax benefits and learning cost.

Technical Breakdown · Distilled from the original source

Patch status and standards scope

  • Peter Eisentraut committed the SQL/PGQ implementation on March 16, 2026, targeting ISO/IEC 9075-16:2023. The article’s opening update says the change was rolled back, so the details below describe the reverted implementation, not features available in PostgreSQL 19.

Property graph objects and permissions

  • A property graph is represented as a relation with a new relkind value, RELKIND_PROPGRAPH. It behaves like a view in several respects, and the query rewriter converts property graph queries into standard relational queries.
  • Access checks follow a model similar to a security-invoker view. The patch did not implement a security-definer variant. The pg_get_propgraphdef() function was intended for use by pg_dump and psql.

Two ways to write a two-hop query

  • The example counts matches along two knows edges starting from person 42. The ordinary SQL version joins knows to itself on k1.b = k2.a and constrains the starting point with k1.a = 42.
  • The GRAPH_TABLE version uses MATCH to spell out three person nodes and two directed knows edges, projects the endpoint ID with COLUMNS (c.id), and counts the resulting rows with an outer count(*). The author questions what the graph syntax adds for a simple join like this; the comparison does not make a performance claim.
Source: select * from depesz;· depesz.com

PG Radar summarizes verified changes and impact. Read the original post for full technical details and code samples.

Read Official Source

Related PostgreSQL Reference