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
Configuration Parameters
SQL Reference
FAQ
Define a new external server.
CREATE SERVER server_name [ TYPE 'server_type' ] [ VERSION 'server_version' ]
FOREIGN DATA WRAPPER fdw_name
[ OPTIONS ( [ mpp_execute { 'master' | 'any' | 'all segments' } [, ] ] option 'value' [, ... ] ) ]
CREATE SERVER Defines a new external server. The user who defines the server will become its owner.
External servers usually encapsulate external data wrappers to access connection information from external data sources. Other user-specific connection information can be specified through user mapping.
Creating a server requires USAGE privileges to the specified external data wrapper.
server_name
server_type
server_version
fdw_name
OPTIONS ( option 'value' [, ... ] )
mpp_execute { 'master' | 'any' | 'all segments' }
When using the dblink module (see dblink), the external server name can be used as a parameter to the dblink_connect() function to provide connection parameters. You must have USAGE privileges on an external server to use it this way.
Create an external server called myserver that uses an external data wrapper named pgsql and contains connection options:
CREATE SERVER myserver FOREIGN DATA WRAPPER pgsql
OPTIONS (host 'foo', dbname 'foodb', port '5432');
CREATE SERVER complies with ISO/IEC 9075-9 (SQL/MED).