www_fdw
www_fdw · Foreign data wrapper for accessing web services from PostgreSQL.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100021 | www_fdw | www_fdw | 0.1.9 | FDW | PostgreSQL | C |
Usage
Sources:
- Official README
- Official control file
- Official installation SQL
- Official documentation
- Official examples
www_fdw is an abandoned foreign data wrapper that turns a SELECT into an HTTP request and converts JSON, XML, or callback-decoded responses into rows. It targets early PostgreSQL FDW APIs and is best treated as historical integration code, not as a maintained HTTP client for current servers.
Core Workflow
Create the extension, a server containing the service base URI, a user mapping, and a foreign table whose columns can serve as request parameters and response fields.
With the default serializer, equality predicates become URL key/value parameters. Other operators require a custom request callback. The automatic JSON or XML decoder searches breadth-first for the first homogeneous array and maps its fields to the foreign-table columns.
Server Options and Callbacks
uriis the base endpoint;uri_selectandmethod_selectcustomize the read path and HTTP method.request_user_agentandrequest_user_headeradd request headers.request_serialize_callbackreceives serialized query conditions and can construct a custom URL or body.request_serialize_typesupportslog,null,json, orxmlrepresentations.response_typesupportsjson,xml, orother.response_deserialize_callbackparses a response;response_iterate_callbackcan transform each returned tuple.ssl_cert,ssl_key,cainfo, andproxypass connection settings to libcurl.
Although option names for insert, update, and delete exist, the official documentation says FDW writes are not implemented.
Security and Compatibility
Queries cause the database server to make network requests. Restrict FDW and server ownership, validate every endpoint and proxy, and prevent untrusted roles from turning the database into an SSRF path to internal services. Treat response data, request headers, certificate paths, and callback functions as untrusted integration inputs.
Release 0.1.9 documents PostgreSQL 9.2 support and says the master branch’s PostgreSQL 9.5 support was untested. The project is no longer maintained, depends on old libcurl/libjson/libxml integration, and provides limited planning behavior. Use timeouts and external isolation when evaluating it, and prefer a maintained service-ingestion design on supported PostgreSQL releases.