Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Pg_graphwright: A Postgres knowledge-graph index that inherits row-level-SEC

Pg_graphwright is a Postgres-based knowledge graph index that builds upon row-level security (RLS) features, enabling graph-style queries while inheriting existing database security policies.

Background

- **pg_graphwright** is an open-source tool that builds "knowledge graphs" (structured networks of entities and relationships) directly inside a PostgreSQL database, using the database's native row-level security (RLS) for access control. - Row-level security (RLS) is a Postgres feature that lets you restrict which rows a user can see based on their identity (e.g., "user Alice can only see rows where owner = 'Alice'"). pg_graphwright inherits this automatically, so graph queries respect existing permissions without extra code. - A "knowledge graph" indexes connections between pieces of data (people, places, events, etc.) to enable semantic search, recommendation, or AI reasoning — notable examples include Google's Knowledge Graph and LinkedIn's entity graph. - This project is relevant because it lets developers add graph capabilities to existing Postgres deployments without a separate graph database (like Neo4j), while keeping Postgres's mature security model intact — a gap many prior graph-on-Postgres tools have not addressed well.