時(shí)間:2024-02-05 12:47作者:下載吧人氣:27
前言
最近在工作的時(shí)候 需要用數(shù)據(jù)庫(kù)A中的表a1來(lái)更新插入數(shù)據(jù)庫(kù)B中的b2表 由于數(shù)據(jù)庫(kù)都是postgres數(shù)據(jù)庫(kù)
我想到了 postgres_fdw插件
準(zhǔn)備工作
首先需要保證這兩個(gè)數(shù)據(jù)庫(kù)之間網(wǎng) 是通的
數(shù)據(jù)庫(kù)A 名字 AA ip 10.10.2.100(虛構(gòu))端口 5432 用戶名 postgres
數(shù)據(jù)庫(kù)B 名字 BB ip 100.20.0.120(虛構(gòu))端口 6688 用戶名 postgres
Create extension “postgres_fdw”;
網(wǎng)友評(píng)論