当前位置:网站首页>oracle带xy字段值的关系表同步到pg数据库转为几何字段
oracle带xy字段值的关系表同步到pg数据库转为几何字段
2022-06-10 23:41:00 【L.傲骨雄风】
1.下载oracle_fdw
https://github.com/laurenz/oracle_fdw/releases
2.将文件移动到pg安装路径下
下载完成将zip包解压,把【lib】文件夹的oracle_fdw.dll和【share/extension】目录下的三个文件分别复制到PostgreSQL安装目录下的【lib】文件夹和【share/extension】目录里去。
-- 创建oracle_fdw
create extension oracle_fdw;
-- 语句能查询到oracle_fdw extension,
select * from pg_available_extensions;
3.通过oracle_fdw访问oracle
--创建访问oracle的连接
create server oracle foreign data wrapper oracle_fdw options(dbserver '127.0.0.1:1521/orcl');
--授予postgres用户访问权限
grant usage on foreign server oracle to postgres;
--创建到oracle的映射
create user mapping for postgres server oracle options(user 'gis',password 'gis');
create foreign table point(
tp_guid uuid,
x numeric,
y numeric,
lng numeric,
lat numeric,
remarks varchar(150)
) server oracle options(schema 'GIS',table 'POINT'); //scheme table名称必须大写
--在pg中访问oracle的表
select st_geomfromtext('POINT('||X||' '||Y||')',4550) from point
【另外说明:oracle数据增删pg数据会跟着改变,保持实时同步】
边栏推荐
- systemd 下开机启动的优化,删除无用的systemd服务
- [MVC&Core]ASP. Introduction to net core MVC view value transfer
- 亿级搜索系统(优酷视频搜索)的基石,如何保障实时数据质量?v2020
- The JVM determines whether an object can be recycled
- Dictionary sort of array
- Décomposition détaillée du problème de chemin le plus court du graphique
- 扎实的基础知识+正确的方法是快速阅读源码的关键
- 数组的字典排序
- Objects as points personal summary
- Room first use
猜你喜欢

Dynamic programming classical topic triangle shortest path

飞利浦 COO 人事变动,将临危受命解决“供应链和产品召回”双重危机
![[network planning] 2.4 DNS: directory service of the Internet](/img/a8/74a1b44ce4d8b0b1a85043a091a91d.jpg)
[network planning] 2.4 DNS: directory service of the Internet
![[network counting] 1.4 network delay, packet loss and throughput](/img/a8/74a1b44ce4d8b0b1a85043a091a91d.jpg)
[network counting] 1.4 network delay, packet loss and throughput
![[network planning] 3.2 transport layer - UDP: connectionless service](/img/a8/74a1b44ce4d8b0b1a85043a091a91d.jpg)
[network planning] 3.2 transport layer - UDP: connectionless service

Review of software architecture in Harbin Institute of technology -- LSP principle, covariance and inversion

Philips coo will be assigned to solve the dual crisis of "supply chain and product recall" in the face of crisis due to personnel change

Pirate OJ 448 luck draw

Unity mesh patch generates parabola and polyline
![[no title] 4555](/img/6c/df2ebb3e39d1e47b8dd74cfdddbb06.gif)
[no title] 4555
随机推荐
Dictionary sort of array
图的最短路径问题 详细分解版
Learning notes: hook point of plug-in activity
BGP basic concept and iBGP basic configuration
【无标题】6666666
B 树的简单认识
Word在目录里插入引导符(页码前的小点点)的方法
lucene思维导图,让搜索引擎不再难懂
WIN11卸载小组件
ts+fetch实现选择文件上传
[network planning] 2.4 DNS: directory service of the Internet
day01
自动化测试系列
STM32下载代码后出现无法再次下载的问题
Can I buy annuity insurance? Is annuity insurance safe?
C语言实现设置桌面壁纸
twelve billion three hundred and twenty-four million two hundred and forty-three thousand two hundred and forty-two
Go language channel understanding and use
The principle and source code interpretation of executor thread pool in concurrent programming
Detailed decomposition of the shortest path problem in Figure