主要sql语句:
create server server_remote foreign data wrapper postgres_fdw options(host '127.0.0.1',port '5432',dbname 'db1');
create user mapping for wln server server_remote options(user 'user1',password '111111');
CREATE FOREIGN TABLE tb1(id int,remark text) server server_remote options (schema_name 'sch1',table_name 'tb1');
参考:
https://www.postgresql.org/docs/current/static/postgres-fdw.html
https://yq.aliyun.com/articles/51199?spm=5176.100239.blogcont3074.10.d6nVdg
https://my.oschina.net/Kenyon/blog/214953
原文链接:https://www.f2er.com/postgresql/193680.html