//利用kingbase远程库关联插件
CREATE EXTENSION kingbase_fdw;
CREATE SERVER foreign_server
FOREIGN DATA WRAPPER kingbase_fdw
OPTIONS (host '127.0.0.1', port '54321', dbname 'kmjh1019');
CREATE USER MAPPING FOR elitel
SERVER foreign_server
OPTIONS (user 'elitel', password 'Elitel!@3$');
CREATE FOREIGN TABLE foreign_table (
id integer NOT NULL,
data text
)
SERVER foreign_server
OPTIONS (schema_name 'some_schema', table_name 'some_table');
IMPORT FOREIGN SCHEMA "dbo" FROM SERVER foreign_server INTO "test";