yum install git readline-devel zlib-devel
cd /opt
tar xvzf postgresql-9.3.2.tar.gz
cd /opt/postgresql-9.3.2/contrib/
git clone git://git.postgresql.org/git/pldebugger.git
./configure
make
cd /opt/postgresql-9.3.2/contrib/pldebugger
make
make install
/bin/mkdir -p '/usr/local/pgsql/lib'/bin/mkdir -p '/usr/local/pgsql/share/extension'/bin/mkdir -p '/usr/local/pgsql/share/extension'/bin/mkdir -p '/usr/local/pgsql/share/doc//extension'/usr/bin/install -c -m 755 plugin_debugger.so '/usr/local/pgsql/lib/plugin_debugger.so'/usr/bin/install -c -m 644 ./pldbgapi.control '/usr/local/pgsql/share/extension/'/usr/bin/install -c -m 644 ./pldbgapi--1.0.sql ./pldbgapi--unpackaged--1.0.sql '/usr/local/pgsql/share/extension/'/usr/bin/install -c -m 644 ./README.pldebugger '/usr/local/pgsql/share/doc//extension/'
cp /usr/local/pgsql/lib/plugin_debugger.so /usr/pgsql-9.3/lib/
cp /usr/local/pgsql/share/extension/pldbgapi--1.0.sql /usr/pgsql-9.3/share/extension/
cp /usr/local/pgsql/share/extension/pldbgapi--unpackaged--1.0.sql /usr/pgsql-9.3/share/extension/
cp /usr/local/pgsql/share/extension/pldbgapi.control /usr/pgsql-9.3/share/extension/
vim /var/lib/pgsql/9.3/data/postgresql.conf
加入
shared_preload_libraries = '$libdir/plugin_debugger'
service postgresql-9.3 restart
su - postgres
psql
CREATE EXTENSION pldbgapi;
\dx
-bash-4.1$ psqlpsql (9.3.2)Type "help" for help.postgres=# CREATE EXTENSION pldbgapi;CREATE EXTENSIONpostgres=# \dxList of installed extensionsName | Version | Schema | Description-----------+---------+------------+------------------------------------------------------adminpack | 1.0 | pg_catalog | administrative functions for PostgreSQLpldbgapi | 1.0 | public | server-side support for debugging PL/pgSQL functionsplpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language(3 rows)postgres=#
0 意見:
張貼留言