YMatrix
Quick Start
Connecting
Benchmarks
Deployment
Data Usage
Manage Clusters
Upgrade
Global Maintenance
Expansion
Monitoring
Security
Best Practice
Technical Principles
Data Type
Storage Engine
Execution Engine
Streaming Engine(Domino)
MARS3 Index
Extension
Advanced Features
Advanced Query
Federal Query
Grafana
Backup and Restore
Disaster Recovery
Guide
Performance Tuning
Troubleshooting
Tools
Configuration Parameters
SQL Reference
Define a new external data wrapper.
CREATE FOREIGN DATA WRAPPER name
[ HANDLER handler_function | NO HANDLER ]
[ VALIDATOR validator_function | NO VALIDATOR ]
[ OPTIONS ( [ mpp_execute { 'master' | 'any' | 'all segments' } [, ] ] option 'value' [, ... ] ) ]
CREATE FOREIGN DATA WRAPPER creates a new external data wrapper in the current database. The user who defines an external data wrapper will become its owner.
Only superusers can create external data wrappers.
name
HANDLER handler_function
VALIDATOR validator_function
OPTIONS ( option 'value' [, ... ] )
mpp_execute { 'master' | 'any' | 'all segments' }
The external data wrapper functionality is still under development. The optimization of the query is original (mostly left to the wrapper).
Create a useless external data wrapper named dummy:
CREATE FOREIGN DATA WRAPPER dummy;
Create an external data wrapper named file using a handler called file_fdw_handler:
CREATE FOREIGN DATA WRAPPER file HANDLER file_fdw_handler;
Create an external data wrapper called mywrapper, which includes an option:
CREATE FOREIGN DATA WRAPPER mywrapper OPTIONS (debug 'true');
CREATE FOREIGN DATA WRAPPER complies with ISO/IEC 9075-9 (SQL/MED), but the LIBRARY and VALIDATOR clauses are extensions and exceptions, while the standard clauses LIBRARY and LANGUAGE are not implemented in the YMatrix database.
But please note that the entire SQL/MED function has not met the requirements yet.