pgrdf
pgrdf : RDF, SPARQL, SHACL, and OWL reasoning for PostgreSQL
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-- | No | Yes | Yes | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | pgrdf |
| See Also | sparql rdf_fdw age pg_liquid onesparse graph ltree xml2 plxslt omni_xml |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.6.40 |
18 17 16 15 14 | pgrdf |
- |
| RPM | PIGSTY | 0.6.40 |
18 17 16 15 14 | pgrdf_$v |
- |
| DEB | PIGSTY | 0.6.40 |
18 17 16 15 14 | postgresql-$v-pgrdf |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| el8.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| el9.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| el9.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| el10.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| el10.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| d12.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| d12.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| d13.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| d13.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| u22.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| u22.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| u24.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| u24.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| u26.x86_64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
| u26.aarch64 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 | PIGSTY 0.6.39 |
Source
github.com/styk-tv/pgRDF
pgrdf-0.6.40.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
Sources:
- 0.6.40 release
- pgrdf.control
- README.md
- Cargo.toml
- guide/01-install.md
- guide/tour.md
- guide/05-graphs.md
- guide/06-validation-recipes.md
- 0.6.39 to 0.6.40 upgrade
pgrdf 0.6.40 stores RDF graphs in PostgreSQL with Turtle/TriG/N-Quads ingestion, SPARQL queries and updates, SHACL validation, and RDFS/OWL reasoning. Preload pgrdf and restart before creating the extension as a superuser.
Core Workflow
Operational Boundaries
The fixed pgrdf schema provides add_graph, graph_id, parse_turtle, load_turtle, sparql, materialize, validate, stats and surface. File loaders read server-side paths; grant access deliberately. can_clear_graphs() reports graph-clear privileges. Non-owner graph writes require the documented underlying table grants; graph locks still apply. shacl_capability() reports the supported validation surface, and path-depth/truncation settings bound traversal. Source features cover PostgreSQL 14–18; published Linux binaries target PG18. Version 0.6.39 allocates graph IDs from a non-reusing sequence; the IRI is the graph identity, and gaps are normal. After installing the matching library, run ALTER EXTENSION pgrdf UPDATE in each database. A newer library rejects old SQL with SQLSTATE 55000. Do not use the broken 0.6.35–0.6.38 PGXN source archives. Preserve graph/dictionary data together in verified backups.
Ownership Repair in 0.6.40
The 0.6.39 upgrade could leave _pgrdf_graph_id_seq owned by the upgrade executor after storage tables had been transferred to another role, preventing new graph creation. Version 0.6.40 aligns that sequence with the owner of _pgrdf_quads; granting sequence usage alone is insufficient. pgrdf.ownership_drift() reports mismatched storage owners and proposed repair commands. Review them before applying role changes. Upgrade SQL in each database after installing matching binaries; versions 0.6.34–0.6.38 can upgrade directly to 0.6.40.