书接上文:pg>编译安装-自定义安装目录 (ivan.gold)
1、下载
https://pgxn.org/dist/orafce/
这里使用最新版orafce-3.16.2.zip
2、安装
root:
1)解压
unzip orafce-3.16.2.zip
2)移动到pg安装目录的extension目录下
mv -f orafce-3.16.2 /home/pg12/pgsql/share/extension
3)这里使用postgres12用户编译,因此将pg安装目录属组给postgres12用户
chown -R postgres12:postgres12 /home/pg12/pgsql
su - postgres12
cd /home/pg12/pgsql/share/extension/orafce-3.16.2
make
make install
psql postgres postgres12
postgres-# \dn
List of schemas
Name | Owner
--------+------------
public | postgres12
postgres=# create extension orafce;
postgres=# \dn
List of schemas
Name | Owner
--------------+------------
dbms_alert | postgres12
dbms_assert | postgres12
dbms_output | postgres12
dbms_pipe | postgres12
dbms_random | postgres12
dbms_utility | postgres12
oracle | postgres12
plunit | postgres12
plvchr | postgres12
plvdate | postgres12
plvlex | postgres12
plvstr | postgres12
plvsubst | postgres12
public | postgres12
utl_file | postgres12
#创建完orafce拓展就能看到orafce所建立的schema。
#测试:
postgres=# select 1 from dual;
?column?
----------
1
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+-----------------------------------------------------------------------------------------------
orafce | 3.16 | public | Functions and operators that emulate a subset of functions and packages from the Oracle RDBMS
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
No Leanote account? Sign up now.