一、设置Orcale客户端
续上文已经安装了Oracle客户端
[root@pg01 oracle_fdw-1.5.0]# more ~/.bashrc
# .bashrc
export PGHOME=/usr/local/pg9.6
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG='simplified chinese_china'.ZHS16GBK
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PGHOME/bin:$PATH
二、安装Oracle_fdw扩展
[root@pg01]# source ~/.bashrc
[root@pg01~]# unzip oracle_fdw-1.5.0.zip
[root@pg01 oracle_fdw-1.5.0]# which pg_config
/usr/local/pg9.6/bin/pg_config
[root@pg01 oracle_fdw-1.5.0]#
[root@pg01 oracle_fdw-1.5.0]# make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -fpic -I/usr/lib/oracle/11.2/client64/sdk/include -I/usr/lib/oracle/11.2/client64/oci/include -I/usr/lib/oracle/11.2/client64/rdbms/public -I/usr/include/oracle/12.1/client -I/usr/include/oracle/12.1/client64 -I/usr/include/oracle/11.2/client -I/usr/include/oracle/11.2/client64 -I/usr/include/oracle/11.1/client -I/usr/include/oracle/11.1/client64 -I/usr/include/oracle/10.2.0.5/client -I/usr/include/oracle/10.2.0.5/client64 -I/usr/include/oracle/10.2.0.4/client -I/usr/include/oracle/10.2.0.4/client64 -I/usr/include/oracle/10.2.0.3/client -I/usr/include/oracle/10.2.0.3/client64 -I. -I./ -I/usr/local/pg9.6/include/postgresql/server -I/usr/local/pg9.6/include/postgresql/internal -D_GNU_SOURCE -c -o ora