PgSQL dblink的配置

#su - postgres

# vi .bash_profile

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

export PGHOME=/usr/local/pgsql/
export PGDATA=/data/pgsql_5432/data/
export LD_LIBRARY_PATH=/usr/local/pgsql/lib

export BACKUP_PATH=/data/db_backup
export ARCLOG_PATH=/data/pgsql_5432/archive/
export SRVLOG_PATH=/data/pgsql_5432/logs

export PATH=$PATH:$HOME/.local/bin:$HOME/bin:$PGHOME/bin:$PATH

$ cd /usr/local/pgsql/contrib/dblink/

$make && make install

In file included from ../../src/include/postgres.h:47:0,
from path.c:17:
../../src/include/utils/elog.h:71:28: fatal error: utils/errcodes.h: No such file or directory
#include "utils/errcodes.h"
^
compilation terminated.
make[2]: *** [path_srv.o] Error 1
make[2]: Leaving directory `/usr/local/postgresql-12.3/src/port'
make[1]: *** [submake-libpgport] Error 2
make[1]: Leaving directory `/usr/local/postgresql-12.3/src/interfaces/libpq'
make: *** [submake-libpq] Error 2

 

上一篇:70 常用sql语句及注意事项/创建视图/存储过程/dblink/序列/触发器/索引等


下一篇:同一服务器上不同数据库之间同步表数据