22+ Foreign Data Wrappers Extensions for PostgreSQL

postgres_fdw, oracle_fdw, mysql_fdw, mongo_fdw, and other Postgres foreign data wrappers — query remote systems as native tables. Ranked by GitHub stars.

Last reviewed: May 15, 2026
22 extensions
1
wrappers
845+7 30d

Foreign data wrappers developed by Supabase

Foreign Data Wrappers·Apache-2.0·Rust
2
mysql_fdw
5960 30d

Foreign data wrapper for querying a MySQL server

Foreign Data Wrappers·BSD-3-Clause·C
3
oracle_fdw
541+2 30d

foreign data wrapper for Oracle access

Foreign Data Wrappers·PostgreSQL·C
4
redis_fdw
534−1 30d

Foreign data wrapper for querying a Redis server

Foreign Data Wrappers·PostgreSQL·C
5
tds_fdw
426+1 30d

Foreign data wrapper for querying a TDS database (Sybase or Microsoft SQL Server)

Foreign Data Wrappers·PostgreSQL·C
6
mongo_fdw
3400 30d

foreign data wrapper for MongoDB access

Foreign Data Wrappers·LGPL-3.0·C
7
sqlite_fdw
2590 30d

SQLite Foreign Data Wrapper

Foreign Data Wrappers·PostgreSQL·C
8
aws_s3
1770 30d

aws_s3 postgres extension to import/export data from/to s3

Foreign Data Wrappers·Apache-2.0·SQL
9
hdfs_fdw
1400 30d

foreign-data wrapper for remote hdfs servers

Foreign Data Wrappers·BSD-3-Clause·C
10
kafka_fdw
1120 30d

kafka Foreign Data Wrapper for CSV formatted messages

Foreign Data Wrappers·PostgreSQL·C
11
multicorn
112+1 30d

Fetch foreign data in Python in your PostgreSQL server.

Foreign Data Wrappers·PostgreSQL·C
12
jdbc_fdw
780 30d

foreign-data wrapper for remote servers available over JDBC

Foreign Data Wrappers·PostgreSQL·C
13
odbc_fdw
720 30d

Foreign data wrapper for accessing remote databases using ODBC

Foreign Data Wrappers·PostgreSQL·C
14

Foreign data wrapper for Firebird

Foreign Data Wrappers·PostgreSQL·C
15

Extension for querying PgBouncer stats from normal SQL views & running pgbouncer commands from normal SQL functions

Foreign Data Wrappers·PostgreSQL·SQL
16
redis
310 30d

Send redis pub/sub messages to Redis from PostgreSQL Directly

Foreign Data Wrappers·MIT·C
17

foreign-data wrapper for remote PGSpider servers

Foreign Data Wrappers·PostgreSQL·C
18
log_fdw
260 30d

foreign-data wrapper for Postgres log file access

Foreign Data Wrappers·Apache-2.0·C
19

foreign data wrapper for DB2 access

Foreign Data Wrappers·PostgreSQL·C
20

connect to other PostgreSQL databases from within a database

Foreign Data Wrappers·PostgreSQL·C
21

foreign-data wrapper for flat file access

Foreign Data Wrappers·PostgreSQL·C
22

foreign-data wrapper for remote PostgreSQL servers

Foreign Data Wrappers·PostgreSQL·C

What is a PostgreSQL Foreign Data Wrapper?

A foreign data wrapper (FDW) is a Postgres extension that exposes a remote system — another database, an HTTP API, an object store, a file — as a set of foreign tables. You declare a foreign server, map credentials with a user mapping, define a foreign table schema, and then SELECT (and sometimes INSERT/UPDATE) from that table. Postgres translates the query, routes it to the remote system, and returns the rows back into your transaction. The FDW interface itself is part of core Postgres (SQL/MED standard), but each target system needs its own wrapper implementation — postgres_fdw for cross-Postgres queries, mysql_fdw, oracle_fdw, mongo_fdw, file_fdw, and dozens more.

When to Use a Foreign Data Wrapper

Use an FDW when you need cross-system reads without copying data — joining Postgres tables with MySQL inventory, querying S3 Parquet files from a stored procedure, federated reads across regional databases, or one-time migrations with `INSERT INTO local SELECT FROM foreign`. FDWs are NOT a replacement for replication when you need consistent local reads or sub-millisecond latency: every query hits the remote system, and predicate pushdown quality varies wildly between wrappers. For analytical workloads at scale, look at pg_lakehouse or ParadeDB's lakehouse engine instead. For real-time replication, use logical replication or Debezium. For one-off ETL, FDWs shine.

Frequently Asked Questions

What is a PostgreSQL foreign data wrapper (FDW)?
An FDW is an extension that lets a Postgres database query data stored in a remote system — another Postgres instance, MySQL, Oracle, MongoDB, files on disk, S3, BigQuery, Snowflake, REST APIs — as if it were a local table. The mechanism is part of the SQL/MED standard and built into Postgres core; specific wrappers are distributed as extensions (postgres_fdw, oracle_fdw, mysql_fdw, file_fdw, etc.). Once configured, you write normal SELECT statements and Postgres handles the remote round-trip.
What's the difference between postgres_fdw and dblink?
postgres_fdw is the modern, recommended way to connect two Postgres databases — you declare foreign tables once and query them with standard SQL, and Postgres handles connection pooling, transactions, and predicate pushdown. dblink is the older approach: you call `dblink('connection string', 'SELECT ...')` inline as a function, which returns rows but requires explicit type casts and bypasses Postgres' query planner. For new code, use postgres_fdw. dblink is still useful for ad-hoc remote calls and DDL operations the FDW interface can't express.
Do FDWs work on AWS RDS, Aurora, and Supabase?
Yes — every major managed service supports postgres_fdw (cross-Postgres queries) and a curated set of additional FDWs. AWS RDS and Aurora support postgres_fdw, dblink, oracle_fdw (RDS only), mysql_fdw, and tds_fdw (for SQL Server). Supabase ships postgres_fdw plus its own wrappers for Stripe, Firebase, and ClickHouse via the `wrappers` extension. Neon supports postgres_fdw. Restrictions: most providers block outbound network access to arbitrary hosts, so you'll need to configure VPC peering or allow-list the remote system.
How do I install a PostgreSQL foreign data wrapper?
Install the FDW's OS package (e.g. `apt install postgresql-17-mysql-fdw` or `yum install mysql_fdw_17`), then inside the target database run `CREATE EXTENSION mysql_fdw;`. Next, define the connection: `CREATE SERVER mysrv FOREIGN DATA WRAPPER mysql_fdw OPTIONS (host '...', port '3306');`, attach credentials with `CREATE USER MAPPING FOR current_user SERVER mysrv OPTIONS (username '...', password '...');`, and declare foreign tables with `CREATE FOREIGN TABLE`. On managed services, the binary is pre-installed — only the SQL steps are needed.
Which FDW should I use for Oracle, MySQL, MongoDB, or S3?
For Oracle: oracle_fdw — the most mature non-Postgres wrapper, used in production for years. For MySQL/MariaDB: mysql_fdw is standard. For MongoDB: mongo_fdw works for simple JSON document reads. For S3 / Parquet / Iceberg: pg_lakehouse or ParadeDB's wrappers give the best performance — they push predicates down into the columnar format. For BigQuery / Snowflake / Redshift: Supabase's `wrappers` collection or commercial wrappers from CrunchyData. For arbitrary REST APIs: multicorn (Python-based FDW framework) lets you write a custom wrapper in 50 lines.

Manage PostgreSQL Visually

1bench is a modern GUI client for PostgreSQL — install extensions, write queries, and inspect schemas without leaving the IDE.

Try 1bench for PostgreSQL