PostgreSQL extension (scaffold)
Status: SCAFFOLD.
pg_quidnug will be a PostgreSQL extension that exposes relational
trust as a SQL function, letting row-level security policies and
views filter data by per-observer Quidnug trust.
Planned SQL surface
-- Query relational trustSELECT quidnug.trust('alice-quid', 'bob-quid', 'contractors.home', 5);-- → returns numeric in [0, 1]
-- Enforce RLS based on trustCREATE POLICY trusted_authors ON documents USING ( quidnug.trust(current_setting('app.current_quid'), author_quid, 'docs.home') >= 0.7 );
-- Identity lookupSELECT quidnug.identity('alice-quid');-- → jsonbUnder the hood, the extension calls out to a running Quidnug node over HTTP. Results are cached in a LISTEN/NOTIFY-driven invalidation table.
Roadmap
- PL/Python or C extension using
libpqandlibcurl. - Shipped as a container image mountable into Postgres 15+.
- Supabase-compatible packaging.
License
Apache-2.0.