pg_petgraph
A PostgreSQL extension that exposes graph algorithms as plain SQL functions. Each function takes arrays of source and target node ids and returns a table, covering PageRank, betweenness, closeness and eigenvector centrality, strongly and weakly connected components, Louvain community detection, Dijkstra, topological sort and cycle detection.
Elsewhere
- Overall rank
- #153
- First released
- July 2026
- License
- MIT
- Built with
- Rust
Sources 5 references
License MIT
SPDX identifier as classified by GitHub from the repository licence file.
-
"spdx_id": "MIT"
GitHub licence API — alitrack/pg_petgraph · reviewed 2026-11-03
Released 2026-07
Repository creation date; the first tag, v0.1.0, was published the same day.
-
"created_at": "2026-07-15T12:50:20Z"
alitrack/pg_petgraph (GitHub API repository metadata) · reviewed 2026-11-03
Language Rust
The README states the extension is written in Rust with pgrx and petgraph.
-
Graph algorithms for PostgreSQL, written in Rust
README.md · reviewed 2026-11-03
embeddable false
pg_petgraph is a PostgreSQL extension (CREATE EXTENSION), so it runs inside a PostgreSQL server, not in the client process.
-
Graph algorithms for PostgreSQL, written in Rust with pgrx and petgraph.
pg_petgraph on GitHub · reviewed 2026-11-03 -
Requires Rust 1.96+ and a PostgreSQL 16/17/18 development environment.
pg_petgraph README · reviewed 2026-11-03