Pillar 1 — Semantic storage
RDF storage in PostgreSQL. Turtle goes in; dictionary-encoded, hexastore-indexed, LIST-partitioned quads come out — addressable from any Postgres client.
Features in this pillar
- Load Turtle from disk — one UDF reads any
.ttlfile off the server filesystem and ingests it. - Inline Turtle ingest — same parser, no filesystem dependency.
- Verbose ingest statistics — JSONB report of timing, cache hits, batch counts.
- Per-graph LIST partitions — cheap whole-graph drops, isolated namespaces.
- Named graphs (IRI ↔ id mapping) — symmetric IRI lookup for graph-scoped SPARQL.
- Hexastore + dictionary — three covering indexes (SPO/POS/OSP), interned terms.
- Term types — typed literals, language tags, blank nodes, RDF collections.
- Bulk ingest — prepared
INSERTpipeline for large ontologies. - Shared-memory dictionary cache — cross-backend hot path for repeated IRIs.
- Graph lifecycle UDFs —
drop_graph,clear_graph,copy_graph,move_graphas partition-level primitives.
At a glance
sql
-- One-time
CREATE EXTENSION pgrdf;
SELECT pgrdf.add_graph(100);
-- Load
SELECT pgrdf.load_turtle('/fixtures/foaf.ttl', 100);
-- → 631
-- Inspect
SELECT pgrdf.count_quads(100);
SELECT * FROM pgrdf._pgrdf_dictionary
WHERE term_type = 1 LIMIT 5;