CREATE FOREIGN DATA WRAPPER
An SQL command for creating a foreign data wrapper
CREATE FOREIGN DATA WRAPPER
is a DDL command for creating a foreign data wrapper (FDW).
CREATE FOREIGN DATA WRAPPER
was added in PostgreSQL 8.4.
psql command
\dew
lists foreign data wrappers.
Usage
Normally CREATE FOREIGN DATA WRAPPER
would be embedded in the SQL file(s) of the extension defining the respective foreign data wrapper and would not be executed directly other than when developing the FDW.
Provision and modification of FDW options is usually performed via CREATE SERVER
and ALTER SERVER
.
Change history
- PostgreSQL 9.1
HANDLER
option added (commit 327e0250)
- PostgreSQL 8.4
- added (commit cae565e5)
Examples
For examples of CREATE FOREIGN DATA WRAPPER
implemented as part of an extension, see the source code for:
References
- PostgreSQL documentation: CREATE FOREIGN DATA WRAPPER