jdbc_fdw
jdbc_fdw : foreign-data wrapper for remote servers available over JDBC
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 8530 | jdbc_fdw | jdbc_fdw | 1.2 |
FDW | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 1.2 |
18 17 16 15 14 | jdbc_fdw |
- |
| RPM | PIGSTY | 0.5.0 |
18 17 16 15 14 | jdbc_fdw_$v |
java-11-openjdk-headless |
| DEB | PIGSTY | 0.5.0 |
18 17 16 15 14 | postgresql-$v-jdbc-fdw |
default-jre-headless, libpq5 |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| el8.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| el9.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| el9.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| el10.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| el10.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| d12.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| d12.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| d13.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| d13.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| u22.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| u22.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| u24.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| u24.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| u26.x86_64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
| u26.aarch64 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 | PIGSTY 0.5.0 |
Source
github.com/pgspider/jdbc_fdw
jdbc_fdw-0.5.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
jdbc_fdw exposes a JDBC data source as PostgreSQL foreign tables and can execute remote SQL through a helper function. Use it when a suitable JDBC driver exists but no more specialized FDW is available; the JVM, driver JAR, credentials, and remote query behavior all run inside a PostgreSQL backend process.
Core Workflow
There are no table-level options in v0.5.0. Foreign columns map by name. Mark the remote primary-key column with OPTIONS (key 'true') when UPDATE or DELETE needs row identity.
Import and Direct SQL
The upstream README says IMPORT FOREIGN SCHEMA currently works only with GridDB. jdbc_exec returns record, so queries returning columns require a column definition list.
Important Options and Limits
- Server options: required
drivernameandurl, absolutejarfile, plusquerytimeoutand JVMmaxheapsize. - User-mapping options:
usernameandpassword. - Column option:
key = trueidentifies primary-key columns for writable operations. jdbc_exec(connname, sql)executes driver-specific SQL and can return a defined record set.
Version 0.5.0 supports predicate, column, and aggregate pushdown according to the upstream project, but not remote RETURNING, GROUP BY, ORDER BY, casts, or transaction-control statements. Arrays and foreign-table TRUNCATE are not implemented. Test type conversion and write semantics with the selected driver.
Protect JAR paths and server definitions from untrusted users, keep passwords in user mappings, and bound the JVM heap and remote query time. The source/package release is 0.5.0 while jdbc_fdw.control continues to declare SQL extension version 1.2; use pg_extension.extversion rather than assuming those version spaces are identical.