pgGraph
Graph database superpowers for your existing Postgres data.
pgGraph is a PostgreSQL extension for running graph search, traversal, shortest path, and relationship queries directly against ordinary PostgreSQL tables.Your tables stay the source of truth. pgGraph builds a derived graph index and
lets you query it from SQL using functions in the graph schema.
[!TIP] Looking for a managed version? We have launched a managed version of pgGraph on polygres.com for full high performance GraphRAG on Postgres.
Why pgGraph?
PostgreSQL is great at relational queries, but graph-style questions often require custom recursive SQL for each schema:
- “Find records related to Alice within 2 hops.”
- “Find the shortest path between this person and this company.”
- “Search nodes across registered tables.”
pgGraph adds graph queries on top of your existing PostgreSQL tables, without requiring a separate graph database, graph-specific storage system, or a new query language.
Quickstart
The repository quickstart builds a disposable PostgreSQL 17 image:
git clone https://github.com/evokoa