背景说明
云数据仓库 PostgreSQL 是基于 PostgreSQL 的 MPP 集群架构,因此也兼容部分 PostgreSQL 生态的插件。本文列出了云数据仓库 PostgreSQL 目前支持的插件类型以及使用方法,若您有其它插件的支持需求,可通过 售后支持 咨询。
插件列表
postgis:版本2.5.2,空间数据库插件,具体可参考 geospatial git。
hll:版本2.14,HyperLogLog 算法插件,具体可参考 postgresql-hll git。
roaringbitmap:版本0.2.66,Bitmap 压缩算法插件,具体可参考 gpdb-roaringbitmap。
orafce:版本3.7,oracle 函数兼容插件,具体可参考 orafce git。
pgcrypto:版本1.1,加密插件,具体可参考 postgresql pgcrypto。
fuzzystrmatch:版本1.0,计算字符串相似点距离插件,具体可参考 postgresql fuzzystrmatch。
使用说明
云数据仓库 PostgreSQL 默认未创建以上插件,用户可以根据自己的需求自行创建或删除,语法如下:
CREATE EXTENSION {extension name};DROP EXTENSION {extension name}
注意
插件的作用域是数据库,也就是在每一个需要使用插件的数据库内,都需要先运行创建语句。
查看当前数据库安装的插件以及插件版本,可使用如下语法:
test_db=> \\dxList of installed extensionsName | Version | Schema | Description---------+---------+------------+-----------------------------------------------------------------------------------------------hll | 2.14 | public | type for storing hyperloglog dataorafce | 3.7 | public | Functions and operators that emulate a subset offunctions and packages from the Oracle RDBMSplpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language(3 rows)