Features of the MySQL Foreign Data Wrapper v2.5.5

Edit this page

The key features of the MySQL Foreign Data Wrapper are listed below:

Writable FDW

MySQL Foreign Data Wrapper provides the write capability. Users can insert, update and delete data in the remote MySQL tables by inserting, updating and deleting the data locally in the foreign tables. MySQL foreign data wrapper uses the Postgres type casting mechanism to provide opposite type casting between MySQL and Postgres data types.

Note

The first column of MySQL table must have unique/primary key for DML to work.

See also:

Example: Using the MySQL Foreign Data Wrapper

Data Type Mappings

Connection Pooling

MySQL_FDW establishes a connection to a foreign server during the first query that uses a foreign table associated with the foreign server. This connection is kept and reused for subsequent queries in the same session.

Where Clause Push-down

MySQL Foreign Data Wrapper allows the push-down of WHERE clause to the foreign server for execution. This fearure optimizes remote queries to reduce the number of rows transferred from foreign servers.

Column Push-down

MySQL Foreign Data Wrapper supports the column push-down. As a result, the query brings back only those columns that are a part of the select target list.

Prepared Statement

MySQL Foreign Data Wrapper supports Prepared Statement. The select queries uses prepared statements instead of simple query protocol.

Import Foreign Schema

MySQL Foreign Data Wrapper supports Import Foreign Schema which enables the local host to import table definitions on the EDB Postgres Advanced Server from the MySQL server. The new foreign tables are created with the corresponding column types and same table name as that of remote tables in the existing local schema.

See also:

Example: Import Foreign Schema

Automated Cleanup

MySQL Foreign Data Wrappper allows the cleanup of foreign tables in a single operation using DROP EXTENSION command. This feature is specifically useful when a foreign table is set for a temporary purpose, as in case of data migration. The syntax:

DROP EXTENSION mysql_fdw CASCADE;

For more information, see DROP EXTENSION.