Skip to content

storagePillar 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

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;

Next — Load Turtle from disk →

auto_storiesTraining

A recommended path through Pillar 1 — read in this order and each page builds on the previous one:

  • description Start with Load Turtle from disk — the single UDF call that takes you from "file on disk" to "queryable quads". The simplest end-to-end win.
  • storage Then Per-graph LIST partitions — the partition-per-graph model is the structural choice everything else hangs off. Understand it before going further.
  • account_tree Then Named graphs (IRI ↔ id)Hexastore + dictionary — how graphs are addressed and how terms are stored. The two pillars of cheap storage and fast lookup.
  • description Then Term types — datatypes, language tags, blank nodes, RDF lists. The detail you'll need before any FILTER or aggregate.
  • bolt Then Bulk ingest + Shared-memory dictionary cache — performance characteristics for production loads.
  • build Finish with Graph lifecycle UDFs — once you understand the storage model, the lifecycle operations are partition-level primitives.

Learn more

  • info Refresh on RDF foundations with the RDF 1.1 Primer.
  • description The RDF 1.1 Turtle spec — what parse_turtle is implementing.
  • code Postgres internals — partitioning chapter of the PG manual.
  • mic Audio companion — every page in this pillar has a corresponding podcast episode (see Training).

MIT licensed. Documentation for pgRDF — built with VitePress, served via GitHub Pages.