PostgreSQL跨服务器查询?

Ale*_*nic 4 sql postgresql cross-server

有没有办法可以查询位于"Server 2"上的数据库并在"Server 1"中获取我的数据?这是从远程服务器返回到本地记录的一组记录.

PS:不在同一台服务器上跨数据库查询,因为我知道如何使用dblink.

更新:伟大的ty.

http://www.postgresonline.com/journal/index.php?/archives/44-Using-DbLink-to-access-other-PostgreSQL-Databases-and-Servers.html就像一个魅力.我的胸围是我在postgresql网站上的dblink文档中没有看到它.

rad*_*iel 10

这是旧的 - 现在人们会使用postgres_fdw模块:https://www.postgresql.org/docs/9.3/static/postgres-fdw.html


yoz*_*zey 5

显然,dblink可用于查询其他服务器 - 使用DbLink访问其他PostreSQL数据库和服务器