YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Stream Processing
DR (Disaster Recovery)
Configuration Parameters
Index
Extension
SQL Reference
FAQ
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.