postgres_fdw 是一个 外部数据包装器,作为 contrib 模块提供,用于连接PostgreSQL数据库。
postgres_fdw 在 PostgreSQL 9.3 中添加。
源代码
postgres_fdw 的源代码位于 contrib/postgres_fdw/。
变更历史
- PostgreSQL 18
- 向
postgres_fdw_get_connections()的输出添加了closed列 (commit 857df3ce) - 向
postgres_fdw_get_connections()的输出添加了used_in_xact列 (commit c297a47c) - 向
postgres_fdw_get_connections()的输出添加了user_name列 (commit 4f08ab55) - 向
postgres_fdw_get_connections()的输出添加了remote_backend_pid列 (commit fe186bda) - 可以使用新选项
use_scram_passthrough将SCRAM身份验证传递给远程服务器 (commit 761c7950)
- 向
- PostgreSQL 17
- PostgreSQL 16
- PostgreSQL 15
- PostgreSQL 14
- 支持批量插入;服务器/表级选项
batch_size(commit b663a413) - 添加了函数
postgres_fdw_get_connections()(commit 708d165d) - 添加了函数
postgres_fdw_disconnect()(commit 411ae649) - 添加了函数
postgres_fdw_disconnect_all()(commit 411ae649) - 添加了表/服务器选项
async_capable以启用异步执行支持 (commit 27e1f145) - 添加了服务器选项
keep_connections(commit b1be3074) - 现在可以导入
IMPORT FOREIGN SCHEMA ... LIMIT子句中指定的表 (commit a3740c48) - 添加了对截断外部表的支持 (commit 8ff1c946)
- 支持批量插入;服务器/表级选项
- PostgreSQL 13
- PostgreSQL 12
- PostgreSQL 11
- PostgreSQL 10
- PostgreSQL 9.6
- 添加了对远程 JOIN 的基本支持 (commits e4106b25 and aa09cd24)
- 添加了对远程排序的支持 (commits f18c944b and ccd8f979)
- 添加了通过远程
UPDATE和DELETE直接修改外部表 的支持 (commit 0bf3ae88) - 现在
fetch_size选项可以应用于单个表以及外部服务器 (commit dc203dc3) - 查询取消请求将被传输到远程服务器 (commits f039eaac and 1b812afb)
- 映射到远程服务器上同一用户的用户映射将被合并为单个远程连接 (commit 96198d94)
- 如果
extensions选项中指定了扩展函数和运算符,它们可以被推送到远程服务器 (commit d8949416)
- PostgreSQL 9.4
- 通过改进对排序相关决策的处理,扩展了
VARCHAR列的推送 (commit 76f965ff)
- 通过改进对排序相关决策的处理,扩展了
- PostgreSQL 9.3
- 初始发布 (commit d0d75c40)
示例
有关 postgres_fdw 设置的示例,请参阅条目“外部表”。
参考资料
- PostgreSQL文档: postgres_fdw
有用链接
- PostgreSQL外部数据包装器 (FDW) 概述 - 2023年10月 Cary Huang / HighGo 的博文
- Postgres FDW 的性能提示 - 2023年6月 Christopher Winslett / Crunchy Data 的博文
