Foreign data wrappers

From PostgreSQL wiki

(Difference between revisions)
Jump to: navigation, search
(SQL Databases Wrappers)
Line 56: Line 56:
A wrapper for [ Redis]
A wrapper for [ Redis]
* [ source code]
* [ source code]
* [  install with PGXN]
* [  install with PGXN]

Revision as of 02:36, 20 October 2013


Foreign Data Wrappers

In 2003, a new extension called SQL/MED ("SQL Management of External Data") was added to the SQL standard. It is a standardized way of handling access to remote objects in SQL databases. In 2011, PostgreSQL 9.1 was released with a great support of this standard.

In a nutshell, you can now use various Foreign Data Wrappers (FDW) to connect a PostgreSQL Server to remote data stores. This page is an incomplete list of the Wrappers available right now. Another fdw list can be found at the PGXN website.

The information about how to write a FDW can be found here.

Please keep in mind that most of these wrappers are not officially supported by the PostgreSQL Global Development Group (PGDG) and that some of these projects are still in Beta version. Use carefully!

SQL Databases Wrappers




This extension implements a Foreign Data Wrapper for MySQL. It is supported on PostgreSQL 9.1 and above.

tds_fdw(not working)

This project is not maintained anymore. Consider using odbc_fdw below to access Microsoft SQL Server and derived. I guess you can meanwhile do the reverse, access Postgresql database within Microsoft SQL Server using Linked Servers.


A wrapper for databases with an ODBC driver, including Oracle, DB2, Microsoft SQL Server, Sybase, Pervasive SQL, IBM Lotus Domino, MySQL, PostgreSQL and desktop database products such as FileMaker and Microsoft Access:


A wrapper for databases with a JDBC driver.

informix_fdw (WIP)

NoSQL Databases Wrappers


A wrapper for CouchDB


A wrapper for MongoDB


A wrapper for Redis

Neo4j fdw

A wrapper for Neo4j Neo4j

Tycoon FDW

A wrapper for Kyoto Tycoon

File Wrappers


A CSV files wrapper. Delivered as an official extension of PostgreSQL 9.1


Another CSV wrapper


Fixed-width flat file wrapper


A wrapper for JSON files.



A wrapper fetching text messages from Twitter over the Internet and returning a table


Allows PostgreSQL to query an LDAP server and retrieve data from some pre-configured Organizational Unit


uses GPU devices to accelarate sequential scan on massive amount of records with complex qualifiers.


Reads files located in Amazon S3


Allows to query different web services:

Multicorn Foreign Data Wrappers

Multicorn is an extension that allows FDWs to be written in Python

SQL Database Wrappers


This fdw can be used to access data stored in any database supported by the sqlalchemy python toolkit.

File Wrappers


This fdw can be used to access data stored in various files, in a filesystem. The files are looked up based on a pattern, and parts of the file's path are mapped to various columns, as well as the file's content itself.


This fdw can be used to access data stored in CSV files. Each column defined in the table will be mapped, in order, against columns in the CSV file.



This fdw can be used to access items from an rss feed.


Used to access Apache Hive tables.

Personal tools