rdf_fdw

rdf_fdw

rdf_fdw : Foreign data wrapper for RDF triplestores over SPARQL endpoints

Overview

ID Extension Package Version Category License Language
8760
rdf_fdw
rdf_fdw
2.4.0
FDW
MIT
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-r
No
Yes
No
Yes
yes
no
Relationships
See Also
wrappers
multicorn
postgres_fdw
sparql

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
2.4.0
18
17
16
15
14
rdf_fdw -
RPM
PIGSTY
2.4.0
18
17
16
15
14
rdf_fdw_$v -
DEB
PIGSTY
2.4.0
18
17
16
15
14
postgresql-$v-rdf-fdw -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
MISS
MISS
MISS
MISS
MISS
el8.aarch64
MISS
MISS
MISS
MISS
MISS
el9.x86_64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
el9.aarch64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
el10.x86_64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
el10.aarch64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
d12.x86_64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
d12.aarch64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
d13.x86_64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
d13.aarch64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
u22.x86_64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
u22.aarch64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
u24.x86_64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
u24.aarch64
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
PIGSTY 2.4.0
Package Version OS ORG SIZE File URL
rdf_fdw_18 2.4.0 el9.x86_64 pigsty 138.3 KiB rdf_fdw_18-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_18 2.4.0 el9.aarch64 pigsty 134.5 KiB rdf_fdw_18-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_18 2.4.0 el10.x86_64 pigsty 139.3 KiB rdf_fdw_18-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_18 2.4.0 el10.aarch64 pigsty 135.8 KiB rdf_fdw_18-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-18-rdf-fdw 2.4.0 d12.x86_64 pigsty 328.5 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-18-rdf-fdw 2.4.0 d12.aarch64 pigsty 320.3 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-18-rdf-fdw 2.4.0 d13.x86_64 pigsty 329.6 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-18-rdf-fdw 2.4.0 d13.aarch64 pigsty 320.6 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-18-rdf-fdw 2.4.0 u22.x86_64 pigsty 352.8 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-18-rdf-fdw 2.4.0 u22.aarch64 pigsty 347.1 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-18-rdf-fdw 2.4.0 u24.x86_64 pigsty 339.1 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-18-rdf-fdw 2.4.0 u24.aarch64 pigsty 335.9 KiB postgresql-18-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
rdf_fdw_17 2.4.0 el9.x86_64 pigsty 138.3 KiB rdf_fdw_17-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_17 2.4.0 el9.aarch64 pigsty 134.8 KiB rdf_fdw_17-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_17 2.4.0 el10.x86_64 pigsty 139.2 KiB rdf_fdw_17-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_17 2.4.0 el10.aarch64 pigsty 135.6 KiB rdf_fdw_17-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-17-rdf-fdw 2.4.0 d12.x86_64 pigsty 330.3 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-17-rdf-fdw 2.4.0 d12.aarch64 pigsty 320.1 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-17-rdf-fdw 2.4.0 d13.x86_64 pigsty 329.8 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-17-rdf-fdw 2.4.0 d13.aarch64 pigsty 320.3 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-17-rdf-fdw 2.4.0 u22.x86_64 pigsty 374.5 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-17-rdf-fdw 2.4.0 u22.aarch64 pigsty 369.1 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-17-rdf-fdw 2.4.0 u24.x86_64 pigsty 339.1 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-17-rdf-fdw 2.4.0 u24.aarch64 pigsty 335.7 KiB postgresql-17-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
rdf_fdw_16 2.4.0 el9.x86_64 pigsty 138.4 KiB rdf_fdw_16-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_16 2.4.0 el9.aarch64 pigsty 134.8 KiB rdf_fdw_16-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_16 2.4.0 el10.x86_64 pigsty 139.0 KiB rdf_fdw_16-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_16 2.4.0 el10.aarch64 pigsty 135.8 KiB rdf_fdw_16-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-16-rdf-fdw 2.4.0 d12.x86_64 pigsty 328.7 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-16-rdf-fdw 2.4.0 d12.aarch64 pigsty 320.7 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-16-rdf-fdw 2.4.0 d13.x86_64 pigsty 328.9 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-16-rdf-fdw 2.4.0 d13.aarch64 pigsty 320.5 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-16-rdf-fdw 2.4.0 u22.x86_64 pigsty 372.4 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-16-rdf-fdw 2.4.0 u22.aarch64 pigsty 367.2 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-16-rdf-fdw 2.4.0 u24.x86_64 pigsty 339.0 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-16-rdf-fdw 2.4.0 u24.aarch64 pigsty 335.8 KiB postgresql-16-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
rdf_fdw_15 2.4.0 el9.x86_64 pigsty 140.9 KiB rdf_fdw_15-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_15 2.4.0 el9.aarch64 pigsty 136.7 KiB rdf_fdw_15-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_15 2.4.0 el10.x86_64 pigsty 141.3 KiB rdf_fdw_15-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_15 2.4.0 el10.aarch64 pigsty 138.3 KiB rdf_fdw_15-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-15-rdf-fdw 2.4.0 d12.x86_64 pigsty 331.0 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-15-rdf-fdw 2.4.0 d12.aarch64 pigsty 322.0 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-15-rdf-fdw 2.4.0 d13.x86_64 pigsty 330.1 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-15-rdf-fdw 2.4.0 d13.aarch64 pigsty 321.9 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-15-rdf-fdw 2.4.0 u22.x86_64 pigsty 373.7 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-15-rdf-fdw 2.4.0 u22.aarch64 pigsty 368.3 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-15-rdf-fdw 2.4.0 u24.x86_64 pigsty 339.9 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-15-rdf-fdw 2.4.0 u24.aarch64 pigsty 336.8 KiB postgresql-15-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
rdf_fdw_14 2.4.0 el9.x86_64 pigsty 140.6 KiB rdf_fdw_14-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_14 2.4.0 el9.aarch64 pigsty 136.7 KiB rdf_fdw_14-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_14 2.4.0 el10.x86_64 pigsty 141.4 KiB rdf_fdw_14-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_14 2.4.0 el10.aarch64 pigsty 138.4 KiB rdf_fdw_14-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-14-rdf-fdw 2.4.0 d12.x86_64 pigsty 330.6 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-14-rdf-fdw 2.4.0 d12.aarch64 pigsty 321.3 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-14-rdf-fdw 2.4.0 d13.x86_64 pigsty 330.1 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-14-rdf-fdw 2.4.0 d13.aarch64 pigsty 322.0 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-14-rdf-fdw 2.4.0 u22.x86_64 pigsty 373.5 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-14-rdf-fdw 2.4.0 u22.aarch64 pigsty 368.1 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-14-rdf-fdw 2.4.0 u24.x86_64 pigsty 339.8 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-14-rdf-fdw 2.4.0 u24.aarch64 pigsty 336.8 KiB postgresql-14-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb

Source

pig build pkg rdf_fdw;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install rdf_fdw;		# install via package name, for the active PG version

pig install rdf_fdw -v 18;   # install for PG 18
pig install rdf_fdw -v 17;   # install for PG 17
pig install rdf_fdw -v 16;   # install for PG 16
pig install rdf_fdw -v 15;   # install for PG 15
pig install rdf_fdw -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION rdf_fdw;

Usage

Syntax:

CREATE EXTENSION rdf_fdw;
CREATE SERVER dbpedia FOREIGN DATA WRAPPER rdf_fdw
  OPTIONS (endpoint 'https://dbpedia.org/sparql');

Source: README

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.

Server Setup

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_size
  • enable_pushdown
  • format
  • http_proxy
  • connect_timeout

Proxy credentials belong in a user mapping.

Foreign Tables

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.

Pushdown and DML

The upstream docs specifically call out pushdown for:

  • WHERE
  • LIMIT
  • ORDER BY
  • DISTINCT

They also document data modification support:

  • INSERT
  • UPDATE
  • DELETE

Batching for SPARQL UPDATE traffic is controlled with the batch_size option.

Helper Functions

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.

Notes

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.

Last updated on