Find Related products on Amazon

Shop on Amazon

Postgres as a Graph Database: (Ab)Using PgRouting

Published on: 2025-11-16 12:07:57

pgRouting is a Postgres extension. It's often used for finding the “shortest path” between two locations, however it's a hidden gem in Postgres and can be used for basic graph functionality. pgRouting is typically combined with PostGIS for working with geospatial data, but it can also be useful beyond that as a lightweight alternative to Graph extensions like Apache AGE, or specialized graph databases like Neo4j. Let's explore some useful applications of pgRouting and graphs. What is pgRouting? # pgRouting is an extension of PostGIS that provides geospatial routing functionality. You can use it to calculate the shortest path, perform network analysis, and solve complex routing problems on a graph-based structure. Most commonly, this is used in Geographic Information Systems (GIS) for tasks like determining the fastest route between two locations. Working with Graphs # The power of pgRouting lies in its ability to work with any data structured as a graph. A graph is essentially a ... Read full article.