rdf_fdw
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
rdf_fdw | 2.4.0 | FDW | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 8760 | rdf_fdw | No | Yes | No | Yes | No | Yes | - |
| Related | wrappers multicorn postgres_fdw sparql |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.4.0 | 1817161514 | rdf_fdw | - |
| RPM | PIGSTY | 2.4.0 | 1817161514 | rdf_fdw_$v | - |
| DEB | PIGSTY | 2.4.0 | 1817161514 | postgresql-$v-rdf-fdw | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el8.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el9.x86_64 | PIGSTY 2.4.0 el9.x86_64.pg18 : rdf_fdw_18 rdf_fdw_18-2.4.0-1PIGSTY.el9.x86_64.rpm
| PIGSTY 2.4.0 el9.x86_64.pg17 : rdf_fdw_17 rdf_fdw_17-2.4.0-1PIGSTY.el9.x86_64.rpm
| PIGSTY 2.4.0 el9.x86_64.pg16 : rdf_fdw_16 rdf_fdw_16-2.4.0-1PIGSTY.el9.x86_64.rpm
| PIGSTY 2.4.0 el9.x86_64.pg15 : rdf_fdw_15 rdf_fdw_15-2.4.0-1PIGSTY.el9.x86_64.rpm
| PIGSTY 2.4.0 el9.x86_64.pg14 : rdf_fdw_14 rdf_fdw_14-2.4.0-1PIGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 2.4.0 el9.aarch64.pg18 : rdf_fdw_18 rdf_fdw_18-2.4.0-1PIGSTY.el9.aarch64.rpm
| PIGSTY 2.4.0 el9.aarch64.pg17 : rdf_fdw_17 rdf_fdw_17-2.4.0-1PIGSTY.el9.aarch64.rpm
| PIGSTY 2.4.0 el9.aarch64.pg16 : rdf_fdw_16 rdf_fdw_16-2.4.0-1PIGSTY.el9.aarch64.rpm
| PIGSTY 2.4.0 el9.aarch64.pg15 : rdf_fdw_15 rdf_fdw_15-2.4.0-1PIGSTY.el9.aarch64.rpm
| PIGSTY 2.4.0 el9.aarch64.pg14 : rdf_fdw_14 rdf_fdw_14-2.4.0-1PIGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 2.4.0 el10.x86_64.pg18 : rdf_fdw_18 rdf_fdw_18-2.4.0-1PIGSTY.el10.x86_64.rpm
| PIGSTY 2.4.0 el10.x86_64.pg17 : rdf_fdw_17 rdf_fdw_17-2.4.0-1PIGSTY.el10.x86_64.rpm
| PIGSTY 2.4.0 el10.x86_64.pg16 : rdf_fdw_16 rdf_fdw_16-2.4.0-1PIGSTY.el10.x86_64.rpm
| PIGSTY 2.4.0 el10.x86_64.pg15 : rdf_fdw_15 rdf_fdw_15-2.4.0-1PIGSTY.el10.x86_64.rpm
| PIGSTY 2.4.0 el10.x86_64.pg14 : rdf_fdw_14 rdf_fdw_14-2.4.0-1PIGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 2.4.0 el10.aarch64.pg18 : rdf_fdw_18 rdf_fdw_18-2.4.0-1PIGSTY.el10.aarch64.rpm
| PIGSTY 2.4.0 el10.aarch64.pg17 : rdf_fdw_17 rdf_fdw_17-2.4.0-1PIGSTY.el10.aarch64.rpm
| PIGSTY 2.4.0 el10.aarch64.pg16 : rdf_fdw_16 rdf_fdw_16-2.4.0-1PIGSTY.el10.aarch64.rpm
| PIGSTY 2.4.0 el10.aarch64.pg15 : rdf_fdw_15 rdf_fdw_15-2.4.0-1PIGSTY.el10.aarch64.rpm
| PIGSTY 2.4.0 el10.aarch64.pg14 : rdf_fdw_14 rdf_fdw_14-2.4.0-1PIGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 2.4.0 d12.x86_64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
| PIGSTY 2.4.0 d12.x86_64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
| PIGSTY 2.4.0 d12.x86_64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
| PIGSTY 2.4.0 d12.x86_64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
| PIGSTY 2.4.0 d12.x86_64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 2.4.0 d12.aarch64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
| PIGSTY 2.4.0 d12.aarch64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
| PIGSTY 2.4.0 d12.aarch64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
| PIGSTY 2.4.0 d12.aarch64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
| PIGSTY 2.4.0 d12.aarch64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 2.4.0 d13.x86_64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
| PIGSTY 2.4.0 d13.x86_64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
| PIGSTY 2.4.0 d13.x86_64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
| PIGSTY 2.4.0 d13.x86_64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
| PIGSTY 2.4.0 d13.x86_64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 2.4.0 d13.aarch64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
| PIGSTY 2.4.0 d13.aarch64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
| PIGSTY 2.4.0 d13.aarch64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
| PIGSTY 2.4.0 d13.aarch64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
| PIGSTY 2.4.0 d13.aarch64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 2.4.0 u22.x86_64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
| PIGSTY 2.4.0 u22.x86_64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
| PIGSTY 2.4.0 u22.x86_64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
| PIGSTY 2.4.0 u22.x86_64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
| PIGSTY 2.4.0 u22.x86_64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 2.4.0 u22.aarch64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
| PIGSTY 2.4.0 u22.aarch64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
| PIGSTY 2.4.0 u22.aarch64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
| PIGSTY 2.4.0 u22.aarch64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
| PIGSTY 2.4.0 u22.aarch64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 2.4.0 u24.x86_64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
| PIGSTY 2.4.0 u24.x86_64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
| PIGSTY 2.4.0 u24.x86_64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
| PIGSTY 2.4.0 u24.x86_64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
| PIGSTY 2.4.0 u24.x86_64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 2.4.0 u24.aarch64.pg18 : postgresql-18-rdf-fdw postgresql-18-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
| PIGSTY 2.4.0 u24.aarch64.pg17 : postgresql-17-rdf-fdw postgresql-17-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
| PIGSTY 2.4.0 u24.aarch64.pg16 : postgresql-16-rdf-fdw postgresql-16-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
| PIGSTY 2.4.0 u24.aarch64.pg15 : postgresql-15-rdf-fdw postgresql-15-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
| PIGSTY 2.4.0 u24.aarch64.pg14 : postgresql-14-rdf-fdw postgresql-14-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
|
Build
You can build the RPM / DEB packages for rdf_fdw using pig build:
pig build pkg rdf_fdw # build RPM / DEB packages
Install
You can install rdf_fdw directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install rdf_fdw; # Install for current active PG version
pig ext install -y rdf_fdw -v 18 # PG 18
pig ext install -y rdf_fdw -v 17 # PG 17
pig ext install -y rdf_fdw -v 16 # PG 16
pig ext install -y rdf_fdw -v 15 # PG 15
pig ext install -y rdf_fdw -v 14 # PG 14
dnf install -y rdf_fdw_18 # PG 18
dnf install -y rdf_fdw_17 # PG 17
dnf install -y rdf_fdw_16 # PG 16
dnf install -y rdf_fdw_15 # PG 15
dnf install -y rdf_fdw_14 # PG 14
apt install -y postgresql-18-rdf-fdw # PG 18
apt install -y postgresql-17-rdf-fdw # PG 17
apt install -y postgresql-16-rdf-fdw # PG 16
apt install -y postgresql-15-rdf-fdw # PG 15
apt install -y postgresql-14-rdf-fdw # PG 14
Create Extension:
CREATE EXTENSION rdf_fdw;
Usage
Sources: README, v2.4 release
rdf_fdw is a foreign data wrapper for RDF triplestores exposed through SPARQL endpoints. It lets PostgreSQL query RDF data with SQL, supports SQL clause pushdown, adds an rdfnode type for RDF terms, and includes SPARQL 1.1 function support.
Register a SPARQL Endpoint
Register a SPARQL endpoint with CREATE SERVER:
CREATE SERVER dbpedia
FOREIGN DATA WRAPPER rdf_fdw
OPTIONS (endpoint 'https://dbpedia.org/sparql');
The README documents server options such as:
endpoint(required)batch_sizeenable_pushdownformathttp_proxyconnect_timeout
In v2.4, proxy credentials were moved out of SERVER options and into USER MAPPING for security.
User Mapping and Foreign Tables
CREATE USER MAPPING FOR postgres
SERVER dbpedia
OPTIONS (user 'admin', password 'secret');
rdf_fdw works by declaring foreign tables that embed SPARQL queries and map result variables to PostgreSQL columns. The README also highlights native RDF node handling through the custom rdfnode type.
CREATE FOREIGN TABLE film (
film_id text OPTIONS (variable '?film', nodetype 'iri'),
name text OPTIONS (variable '?name', nodetype 'literal', literal_type 'xsd:string')
)
SERVER dbpedia
OPTIONS (sparql 'SELECT ?film ?name WHERE { ?film dbp:name ?name }');
Pushdown, DML, and Helpers
The upstream docs specifically call out pushdown for:
WHERELIMITORDER BYDISTINCT
They also document data modification support:
INSERTUPDATEDELETE
Batching for SPARQL UPDATE traffic is controlled with the batch_size option.
The README lists utility functions including:
rdf_fdw_version()rdf_fdw_settings()rdf_fdw_clone_table()
It also documents broader SPARQL function coverage, including aggregates, string functions, numeric functions, date/time functions, hash functions, and custom functions.
Caveats
The current README warns that retrieved RDF data is loaded into memory before conversion for PostgreSQL, so large result sets require adequate PostgreSQL memory. It also documents PostgreSQL 9.5+ as the supported baseline.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.