PostgreSQL TDS_FDW 插件安装
[root@localhost src]# rpm -ivh freetds-*
warning: freetds-1.3.3-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:freetds-libs-1.3.3-1.el7 ################################# [ 33%]
2:freetds-1.3.3-1.el7 ################################# [ 67%]
3:freetds-devel-1.3.3-1.el7 ################################# [100%]
[root@localhost src]# unzip tds_fdw-master.zip
[root@localhost src]# cd tds_fdw-master/
[root@localhost tds_fdw-master]# make
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I./include/ -fvisibility=hidden -I. -I./ -I/usr/local/pgsql-12.8/include/server -I/usr/local/pgsql-12.8/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/tds_fdw.o src/tds_fdw.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I./include/ -fvisibility=hidden -I. -I./ -I/usr/local/pgsql-12.8/include/server -I/usr/local/pgsql-12.8/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/options.o src/options.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -I./include/ -fvisibility=hidden -I. -I./ -I/usr/local/pgsql-12.8/include/server -I/usr/local/pgsql-12.8/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/deparse.o src/deparse.c
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fPIC -shared -o tds_fdw.so src/tds_fdw.o src/options.o src/deparse.o -L/usr/local/pgsql-12.8/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql-12.8/lib',--enable-new-dtags -lsybdb
cp sql/tds_fdw.sql sql/tds_fdw--2.0.3.sql
cp README.md README.tds_fdw.md
[root@localhost tds_fdw-master]# make install
/usr/bin/mkdir -p '/usr/local/pgsql-12.8/lib'
/usr/bin/mkdir -p '/usr/local/pgsql-12.8/share/extension'
/usr/bin/mkdir -p '/usr/local/pgsql-12.8/share/extension'
/usr/bin/mkdir -p '/usr/local/pgsql-12.8/share/doc/extension'
/usr/bin/install -c -m 755 tds_fdw.so '/usr/local/pgsql-12.8/lib/tds_fdw.so'
/usr/bin/install -c -m 644 .//tds_fdw.control '/usr/local/pgsql-12.8/share/extension/'
/usr/bin/install -c -m 644 .//sql/tds_fdw--2.0.3.sql '/usr/local/pgsql-12.8/share/extension/'
/usr/bin/install -c -m 644 .//README.tds_fdw.md '/usr/local/pgsql-12.8/share/doc/extension/'
[root@localhost tds_fdw-master]#
[root@localhost tds_fdw-master]# su - postgres
Last login: Tue Aug 1 16:44:15 CST 2023 on pts/1
[postgres@localhost ~]$ psql
psql (12.8)
Type "help" for help.
postgres=# \c cloud_test
You are now connected to database "cloud_test" as user "postgres".
cloud_test=# create extension tds_fdw;
CREATE EXTENSION
cloud_test=#
[root@localhost tds_fdw-master]# cd /usr/local/pgsql-12.8/share/extension/
[root@localhost extension]# chown postgres:postgres ./tds_fdw*
[root@localhost tds_fdw-master]# cd /usr/local/pgsql-12.8/lib/
[root@localhost lib]# chown postgres:postgres ./tds_fdw.so