oai_fdw
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 8770 | oai_fdw | No | Yes | No | Yes | No | Yes | - |
| Related | rdf_fdw http postgres_fdw |
|---|
SQL/control 1.16; package 1.16.0 (tag v1.16). Read-only OAI-PMH 2.0 FDW; libcurl/libxml2; no preload. Response limit has a 1 GB hard ceiling. PG14-18.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.16 | 1817161514 | oai_fdw | - |
| RPM | PIGSTY | 1.16.0 | 1817161514 | oai_fdw_$v | - |
| DEB | PIGSTY | 1.16.0 | 1817161514 | postgresql-$v-oai-fdw | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.16.0 el8.x86_64.pg18 : oai_fdw_18 oai_fdw_18-1.16.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.16.0 el8.x86_64.pg17 : oai_fdw_17 oai_fdw_17-1.16.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.16.0 el8.x86_64.pg16 : oai_fdw_16 oai_fdw_16-1.16.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.16.0 el8.x86_64.pg15 : oai_fdw_15 oai_fdw_15-1.16.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.16.0 el8.x86_64.pg14 : oai_fdw_14 oai_fdw_14-1.16.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 1.16.0 el8.aarch64.pg18 : oai_fdw_18 oai_fdw_18-1.16.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.16.0 el8.aarch64.pg17 : oai_fdw_17 oai_fdw_17-1.16.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.16.0 el8.aarch64.pg16 : oai_fdw_16 oai_fdw_16-1.16.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.16.0 el8.aarch64.pg15 : oai_fdw_15 oai_fdw_15-1.16.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.16.0 el8.aarch64.pg14 : oai_fdw_14 oai_fdw_14-1.16.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 1.16.0 el9.x86_64.pg18 : oai_fdw_18 oai_fdw_18-1.16.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.16.0 el9.x86_64.pg17 : oai_fdw_17 oai_fdw_17-1.16.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.16.0 el9.x86_64.pg16 : oai_fdw_16 oai_fdw_16-1.16.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.16.0 el9.x86_64.pg15 : oai_fdw_15 oai_fdw_15-1.16.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.16.0 el9.x86_64.pg14 : oai_fdw_14 oai_fdw_14-1.16.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 1.16.0 el9.aarch64.pg18 : oai_fdw_18 oai_fdw_18-1.16.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.16.0 el9.aarch64.pg17 : oai_fdw_17 oai_fdw_17-1.16.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.16.0 el9.aarch64.pg16 : oai_fdw_16 oai_fdw_16-1.16.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.16.0 el9.aarch64.pg15 : oai_fdw_15 oai_fdw_15-1.16.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.16.0 el9.aarch64.pg14 : oai_fdw_14 oai_fdw_14-1.16.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 1.16.0 el10.x86_64.pg18 : oai_fdw_18 oai_fdw_18-1.16.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.16.0 el10.x86_64.pg17 : oai_fdw_17 oai_fdw_17-1.16.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.16.0 el10.x86_64.pg16 : oai_fdw_16 oai_fdw_16-1.16.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.16.0 el10.x86_64.pg15 : oai_fdw_15 oai_fdw_15-1.16.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.16.0 el10.x86_64.pg14 : oai_fdw_14 oai_fdw_14-1.16.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 1.16.0 el10.aarch64.pg18 : oai_fdw_18 oai_fdw_18-1.16.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.16.0 el10.aarch64.pg17 : oai_fdw_17 oai_fdw_17-1.16.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.16.0 el10.aarch64.pg16 : oai_fdw_16 oai_fdw_16-1.16.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.16.0 el10.aarch64.pg15 : oai_fdw_15 oai_fdw_15-1.16.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.16.0 el10.aarch64.pg14 : oai_fdw_14 oai_fdw_14-1.16.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 1.16.0 d12.x86_64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.16.0 d12.x86_64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.16.0 d12.x86_64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.16.0 d12.x86_64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.16.0 d12.x86_64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 1.16.0 d12.aarch64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.16.0 d12.aarch64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.16.0 d12.aarch64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.16.0 d12.aarch64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.16.0 d12.aarch64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 1.16.0 d13.x86_64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.16.0 d13.x86_64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.16.0 d13.x86_64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.16.0 d13.x86_64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.16.0 d13.x86_64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 1.16.0 d13.aarch64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.16.0 d13.aarch64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.16.0 d13.aarch64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.16.0 d13.aarch64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.16.0 d13.aarch64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 1.16.0 u22.x86_64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.16.0 u22.x86_64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.16.0 u22.x86_64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.16.0 u22.x86_64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.16.0 u22.x86_64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 1.16.0 u22.aarch64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.16.0 u22.aarch64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.16.0 u22.aarch64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.16.0 u22.aarch64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.16.0 u22.aarch64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 1.16.0 u24.x86_64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.16.0 u24.x86_64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.16.0 u24.x86_64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.16.0 u24.x86_64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.16.0 u24.x86_64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 1.16.0 u24.aarch64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.16.0 u24.aarch64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.16.0 u24.aarch64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.16.0 u24.aarch64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.16.0 u24.aarch64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 1.16.0 u26.x86_64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.16.0 u26.x86_64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.16.0 u26.x86_64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.16.0 u26.x86_64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.16.0 u26.x86_64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 1.16.0 u26.aarch64.pg18 : postgresql-18-oai-fdw postgresql-18-oai-fdw_1.16.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.16.0 u26.aarch64.pg17 : postgresql-17-oai-fdw postgresql-17-oai-fdw_1.16.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.16.0 u26.aarch64.pg16 : postgresql-16-oai-fdw postgresql-16-oai-fdw_1.16.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.16.0 u26.aarch64.pg15 : postgresql-15-oai-fdw postgresql-15-oai-fdw_1.16.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.16.0 u26.aarch64.pg14 : postgresql-14-oai-fdw postgresql-14-oai-fdw_1.16.0-1PGSTY~resolute_arm64.deb
|
Build
You can build the RPM / DEB packages for oai_fdw using pig build:
Install
You can install oai_fdw directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
- CHANGELOG.md
- Official v1.16 README
- Official v1.16 control file
- Official v1.16 changelog
- Official OAI-PMH specification
oai_fdw 1.16 is a foreign data wrapper for harvesting metadata from OAI-PMH 2.0 repositories over HTTP or HTTPS. It maps OAI record headers and XML content to foreign-table columns, supports automatic table generation for repositories or sets, and can copy harvested records into local tables.
Core Workflow
Create a server for the repository, then either define a foreign table explicitly or use IMPORT FOREIGN SCHEMA. Every table needs a metadata format such as oai_dc.
Without setspec, a scan can harvest every set exposed by the repository. Use from, until, or setspec table options and an outer LIMIT where appropriate, but verify request behavior with the remote service.
Import and Support Interfaces
IMPORT FOREIGN SCHEMA oai_repositorycreates one table spanning the repository;oai_setscreates a table per OAI set. Both require themetadataprefiximport option and supportLIMIT TOorEXCEPT.- Column option
oai_nodemapsidentifier,setspec,datestamp,content,metadataprefix, orstatusto compatible PostgreSQL types. - Server options include
url,http_proxy,connect_timeout,connect_retry,request_redirect, andrequest_max_redirect. OAI_HarvestTablecopies a foreign-table harvest into a local table; OAI support functions expose repository metadata such as sets and formats.
Version 1.13 moves proxy_user and proxy_password to the user mapping. Repository user and password also belong there and use HTTP Basic Authentication.
Network, Credentials, and Consistency
Queries perform synchronous remote requests and parse untrusted XML. Latency, pagination, server throttling, redirects, malformed responses, and repository changes affect results. Store credentials in narrowly scoped user mappings, restrict who may create or alter servers, and treat configurable URLs/proxies as outbound-network access with SSRF implications.
OAI-PMH is a harvesting protocol, not a transactional database API. Repeated scans can observe changing pages and deletions; local copies become stale. Record harvest windows and identifiers, make refreshes restartable, and reconcile deleted/status records explicitly. Version 1.13 requires matching libcurl/libxml2 build dependencies and should be tested against each target repository’s metadata format.
Version 1.15
HTTP 429 and 503 retries respect backoff/Retry-After; from/until validation and timestamp granularity are stricter. Server USAGE and view-owner user mappings are checked. Harvest windows and cancellation handling are corrected, and stalled transfers abort after the documented five-minute low-speed threshold. Install matching files and apply ALTER EXTENSION oai_fdw UPDATE. PGXN calls this distribution 1.15.0, while the SQL/control version is 1.15.
1.16 Response Limits
Use the server option max_response_size to bound response bytes; a hard 1 GB ceiling applies even without a smaller configured limit. Exceeding the cap aborts the request. The FDW is read-only: INSERT, UPDATE and DELETE now fail immediately. GetRecord row estimates are capped at one, and EXPLAIN includes the server identity. Distribution 1.16.0 uses SQL version 1.16; install matching files and run ALTER EXTENSION oai_fdw UPDATE TO '1.16'.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)