问题描述
是否可以查询服务器2上的数据库并在服务器1中获取数据?那就是从远程服务器向我的本地服务器返回一组记录。
Is there a way that I might query a database located on "Server 2" and get my data in "Server 1" ? That is return a set of records from a remote server to my local one.
PS:不跨服务器查询数据库,因为我知道如何使用dblink来实现。
PS: Not cross database query on same server because I know how to do that with dblink.
更新:很好。
的工作原理很吸引人。我的失败是在postgresql网站上的dblink文档中没有看到它。
http://www.postgresonline.com/journal/index.php?/archives/44-Using-DbLink-to-access-other-PostgreSQL-Databases-and-Servers.html works like a charm. My bust was that I didn't see it on the dblink documentation on postgresql website.
推荐答案
显然,dblink可用于查询其他服务器-
Apparently dblink can be used to query other servers - Using DbLink to access other PostreSQL Databases and Servers
这篇关于PostgreSQL跨服务器查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!