Apache AGE is a graph database extension for PostgreSQL that adds openCypher graph query capabilities directly within the relational database environment. It functions as a loadable extension that translates Cypher graph traversal queries into SQL expressions, enabling users to run pattern matching and path analysis alongside standard SQL operations within a single database instance.
The extension stores labeled, directed property graphs as isolated schemas with internal relational tables for vertices, edges, and labels, preventing cross-graph interference. It supports hybrid query execution that embeds Cypher patterns inside SQL common table expressions, joins, and subqueries, allowing graph traversals and relational joins to run in a single query plan. Variable-length path traversal is implemented through recursive SQL constructs, and a dedicated CSV bulk import pipeline loads vertex and edge data transactionally.
Users can create, modify, and query graph elements using standard openCypher clauses like MATCH, CREATE, SET, DELETE, and MERGE, with support for aggregation, sorting, filtering, and property management. The extension also allows user-defined PL/pgSQL functions to be registered as graph query functions, extending Cypher with custom logic. Multiple graphs can be referenced within a single SQL statement, and graph query results can be joined with relational tables for combined analysis.