couchdb_fdw
couchdb_fdw · Foreign data wrapper for querying CouchDB from PostgreSQL.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100084 | couchdb_fdw | couchdb_fdw | 1.0 | FDW | PostgreSQL | C |
Usage
Sources:
couchdb_fdw is an old, experimental, read-only foreign data wrapper for exposing CouchDB documents as PostgreSQL rows. Upstream calls it beta, reports known bugs, and says it was tested only with PostgreSQL 9.1-era software and macOS 10.6. Treat it as historical source, not a production integration.
Core Workflow
After installing the required libcurl and YAJL libraries, define the server, credentials, and one foreign table. _doc is a reserved column name that returns the entire document JSON; other columns map top-level JSON attributes.
Important Objects
couchdb_fdwis the foreign-data wrapper.addressandportare server options; their defaults are 127.0.0.1 and 5984.usernameandpasswordare user-mapping options.databaseis the foreign-table option and defaults to test._id,_rev, and_docare special document columns.
Security and Query Limits
The implementation constructs a plain HTTP URL containing the username and password and has no TLS or modern authentication support. Equality on _id is the only meaningful pushdown, with optional _rev; an unqualified scan first obtains all document IDs and then fetches documents individually. It maps only top-level attributes and implements no writes. Credentials remain in PostgreSQL catalogs, remote I/O is synchronous, and failures can interrupt the backend query. Do not expose sensitive credentials or untrusted CouchDB endpoints through this obsolete code.