See your Postgres data as a living graph.
PostgreSQL 19 can describe graphs over the tables you already have. PGQViewer connects to your database, lets you write a short pattern, and draws the result on a canvas you can click around — no extensions, no data copying, no separate graph database to run.
docker run --rm -p 127.0.0.1:8080:8080 -v pgqviewer-data:/data aondev/pgqviewer:latestFree & open source · Apache-2.0 · pull & run with Docker
(a IS person)-[k IS knows]->(b IS person)// the idea
Your tables already describe a graph.
With SQL/PGQ, a graph is just a description laid over tables you already have — the same rows, viewed as nodes and edges. Nothing to migrate, nothing to copy. PGQViewer reads that description from the catalog and draws it for you.
what you store
| 1 | Alice |
| 2 | Bob |
| 3 | Carol |
what you see
// features
Built for exploring, not configuring.
PGQViewer is deliberately small. It shows you the graph that's already in your database — drawn accurately — and otherwise stays out of your way.
two modes
Start with a pattern, drop into SQL anytime
In graph mode you write a MATCH pattern and PGQViewer fills in the rest — there's even a WHERE pane for filtering. Need more? Switch to SQL mode and run verbatim PostgreSQL — joins, CTEs, EXPLAIN — into a sortable table.
(a IS person)-[k IS knows]->(b IS person)WHERE a.born > 1985exploration
Follow the connections
Hover or double-click a vertex to pull in everything it links to. New nodes settle in around it and merge on identity, so you can grow the graph without rewriting your query.
correctness
It won't draw a wrong graph
PostgreSQL will happily accept graph definitions that can't be drawn faithfully — non-unique keys, edges whose REFERENCES don't line up. PGQViewer checks for these when you connect and tells you exactly what to fix.
make it readable
Read the graph however you like
Recolour and caption labels, choose which property shows on each node, map edge thickness to a value, and switch palettes or themes. Whatever you set, PGQViewer remembers it next time.
fourteen layouts
A shape for every dataset
Force-directed for messy clusters, hierarchical for trees, concentric for hubs — pick whatever fits. On big results, the heavier layouts step aside for faster ones so the canvas stays smooth.
schema-aware
Browse the catalog
See every vertex and edge with its labels, property types, and rough row counts. Click one and a ready-to-run MATCH snippet drops straight into the editor.
portable
Take it with you
Save the canvas as PNG or JPG, or export results as GraphML, Cypher, JSON, or CSV — ready for a doc, a deck, or another tool.
// querying
Ask in a line. Get a graph.
There's no new query language to learn and nothing to install in your database. If you can write a line of SQL, you already know enough to start exploring.
- Graph mode does the busywork
- Write a MATCH pattern and PGQViewer works out the rest — it pulls every key and property it needs and draws the matching nodes and edges.
- SQL mode when you want control
- Need more than a pattern? Run anything PostgreSQL understands — joins, recursive CTEs, EXPLAIN — and read the results in a sortable, filterable table.
- Nothing hidden
- The generated SQL is always one click away, long-running queries can be cancelled mid-flight, and rows stream onto the canvas as they arrive.
you write this
(a IS person)-[k IS knows]->(b IS person)SELECT *
FROM GRAPH_TABLE ("public"."social"
MATCH (a IS person)-[k IS knows]->(b IS person)
COLUMNS (
a.id AS a__pk__id, a.name AS a__p__name,
a.born AS a__p__born, k.src AS k__sk__src,
k.dst AS k__dk__dst, k.since AS k__p__since,
b.id AS b__pk__id, b.name AS b__p__name,
b.born AS b__p__born
)
) LIMIT 500;// quick start
Up and running in a minute.
PGQViewer is a small self-hosted web app — one Docker container runs both the UI and the API. Pull the published image, run a single command, and point it at any PostgreSQL 19 database. You bring the database; it brings the graphs.
docker run 127.0.0.1:8080:8080 pgqviewer-data:/data aondev/pgqviewer:latest+ Prefer to build the image yourself?
The repo ships a Dockerfile, so you can build from a checkout instead of pulling — handy for contributors or pinning to a commit.
git clone https://github.com/aoncodev/PGQViewer.git
cd PGQViewer
docker build pgqviewer .
docker run 127.0.0.1:8080:8080 pgqviewer-data:/data pgqviewerConnect
Point PGQViewer at your PostgreSQL 19 database and hit connect. Save it once, reconnect with a click.
Pick a graph
Choose a property graph from the sidebar — its labels and properties are right there, ready to explore.
Explore
Type a pattern, run it, and click around the canvas. Expand, drag, recolor, and export when you're done.
// open source
Open source, contributions welcome.
PGQViewer is Apache-2.0 and developed in the open. It's still early, so feedback genuinely helps — bug reports, fixes, and especially checks against new PostgreSQL 19 betas are all very welcome.
// get started
Start exploring your graphs.
It's free and open source. Pull the image, run one command, and point it at your PostgreSQL 19 — you'll be exploring in a minute. No desktop app to install, no sign-up.
Apache-2.0 · self-hosted with Docker · PostgreSQL 19 (Beta 1 or newer)