软件下载吧文章资讯

分类分类

PostgreSQL 中的postgres_fdw扩展详解

2024-02-14 10:20作者:下载吧

通过postgres_fdw 扩展,访问远程数据库表

一、环境准备

虚拟机(node107):centos7、PostgreSQL10

远程服务器(百度云服务BBC): centos7、PostgreSQL10

在本地虚拟机上访问远程服务器的数据表。

二、配置连接

(1)创建扩展: 在本地107这个节点上创建扩展。

[root@107 ~]# su postgre
su: user postgre does not exist
[root@107 ~]# su postgres
bash-4.2$ psql mydb postgres
could not change directory to “/root”: 权限不够
psql (10.7)
Type “help” for help.

mydb=# CREATE EXTENSION postgres_fdw;
CREATE EXTENSION

展开全部

相关文章

说两句网友评论
    我要跟贴
    取消