rdf_fdw

rdf_fdw

rdf_fdw : Foreign data wrapper for RDF triplestores over SPARQL endpoints

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
8760
rdf_fdw
rdf_fdw
2.4.0
FDW
MIT
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-r
No
Yes
No
Yes
yes
no
Relationships
See Also
wrappers
multicorn
postgres_fdw
sparql

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
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 / PGPG18PG17PG16PG15PG14
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
PackageVersionOSORGSIZEFile URL
rdf_fdw_182.4.0el9.x86_64pigsty138.3 KiBrdf_fdw_18-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_182.4.0el9.aarch64pigsty134.5 KiBrdf_fdw_18-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_182.4.0el10.x86_64pigsty139.3 KiBrdf_fdw_18-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_182.4.0el10.aarch64pigsty135.8 KiBrdf_fdw_18-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-18-rdf-fdw2.4.0d12.x86_64pigsty328.5 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-18-rdf-fdw2.4.0d12.aarch64pigsty320.3 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-18-rdf-fdw2.4.0d13.x86_64pigsty329.6 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-18-rdf-fdw2.4.0d13.aarch64pigsty320.6 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-18-rdf-fdw2.4.0u22.x86_64pigsty352.8 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-18-rdf-fdw2.4.0u22.aarch64pigsty347.1 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-18-rdf-fdw2.4.0u24.x86_64pigsty339.1 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-18-rdf-fdw2.4.0u24.aarch64pigsty335.9 KiBpostgresql-18-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
rdf_fdw_172.4.0el9.x86_64pigsty138.3 KiBrdf_fdw_17-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_172.4.0el9.aarch64pigsty134.8 KiBrdf_fdw_17-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_172.4.0el10.x86_64pigsty139.2 KiBrdf_fdw_17-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_172.4.0el10.aarch64pigsty135.6 KiBrdf_fdw_17-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-17-rdf-fdw2.4.0d12.x86_64pigsty330.3 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-17-rdf-fdw2.4.0d12.aarch64pigsty320.1 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-17-rdf-fdw2.4.0d13.x86_64pigsty329.8 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-17-rdf-fdw2.4.0d13.aarch64pigsty320.3 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-17-rdf-fdw2.4.0u22.x86_64pigsty374.5 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-17-rdf-fdw2.4.0u22.aarch64pigsty369.1 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-17-rdf-fdw2.4.0u24.x86_64pigsty339.1 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-17-rdf-fdw2.4.0u24.aarch64pigsty335.7 KiBpostgresql-17-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
rdf_fdw_162.4.0el9.x86_64pigsty138.4 KiBrdf_fdw_16-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_162.4.0el9.aarch64pigsty134.8 KiBrdf_fdw_16-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_162.4.0el10.x86_64pigsty139.0 KiBrdf_fdw_16-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_162.4.0el10.aarch64pigsty135.8 KiBrdf_fdw_16-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-16-rdf-fdw2.4.0d12.x86_64pigsty328.7 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-16-rdf-fdw2.4.0d12.aarch64pigsty320.7 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-16-rdf-fdw2.4.0d13.x86_64pigsty328.9 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-16-rdf-fdw2.4.0d13.aarch64pigsty320.5 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-16-rdf-fdw2.4.0u22.x86_64pigsty372.4 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-16-rdf-fdw2.4.0u22.aarch64pigsty367.2 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-16-rdf-fdw2.4.0u24.x86_64pigsty339.0 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-16-rdf-fdw2.4.0u24.aarch64pigsty335.8 KiBpostgresql-16-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
rdf_fdw_152.4.0el9.x86_64pigsty140.9 KiBrdf_fdw_15-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_152.4.0el9.aarch64pigsty136.7 KiBrdf_fdw_15-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_152.4.0el10.x86_64pigsty141.3 KiBrdf_fdw_15-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_152.4.0el10.aarch64pigsty138.3 KiBrdf_fdw_15-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-15-rdf-fdw2.4.0d12.x86_64pigsty331.0 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-15-rdf-fdw2.4.0d12.aarch64pigsty322.0 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-15-rdf-fdw2.4.0d13.x86_64pigsty330.1 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-15-rdf-fdw2.4.0d13.aarch64pigsty321.9 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-15-rdf-fdw2.4.0u22.x86_64pigsty373.7 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-15-rdf-fdw2.4.0u22.aarch64pigsty368.3 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-15-rdf-fdw2.4.0u24.x86_64pigsty339.9 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-15-rdf-fdw2.4.0u24.aarch64pigsty336.8 KiBpostgresql-15-rdf-fdw_2.4.0-2PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
rdf_fdw_142.4.0el9.x86_64pigsty140.6 KiBrdf_fdw_14-2.4.0-1PIGSTY.el9.x86_64.rpm
rdf_fdw_142.4.0el9.aarch64pigsty136.7 KiBrdf_fdw_14-2.4.0-1PIGSTY.el9.aarch64.rpm
rdf_fdw_142.4.0el10.x86_64pigsty141.4 KiBrdf_fdw_14-2.4.0-1PIGSTY.el10.x86_64.rpm
rdf_fdw_142.4.0el10.aarch64pigsty138.4 KiBrdf_fdw_14-2.4.0-1PIGSTY.el10.aarch64.rpm
postgresql-14-rdf-fdw2.4.0d12.x86_64pigsty330.6 KiBpostgresql-14-rdf-fdw_2.4.0-2PIGSTY~bookworm_amd64.deb
postgresql-14-rdf-fdw2.4.0d12.aarch64pigsty321.3 KiBpostgresql-14-rdf-fdw_2.4.0-2PIGSTY~bookworm_arm64.deb
postgresql-14-rdf-fdw2.4.0d13.x86_64pigsty330.1 KiBpostgresql-14-rdf-fdw_2.4.0-2PIGSTY~trixie_amd64.deb
postgresql-14-rdf-fdw2.4.0d13.aarch64pigsty322.0 KiBpostgresql-14-rdf-fdw_2.4.0-2PIGSTY~trixie_arm64.deb
postgresql-14-rdf-fdw2.4.0u22.x86_64pigsty373.5 KiBpostgresql-14-rdf-fdw_2.4.0-2PIGSTY~jammy_amd64.deb
postgresql-14-rdf-fdw2.4.0u22.aarch64pigsty368.1 KiBpostgresql-14-rdf-fdw_2.4.0-2PIGSTY~jammy_arm64.deb
postgresql-14-rdf-fdw2.4.0u24.x86_64pigsty339.8 KiBpostgresql-14-rdf-fdw_2.4.0-2PIGSTY~noble_amd64.deb
postgresql-14-rdf-fdw2.4.0u24.aarch64pigsty336.8 KiBpostgresql-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