在postgresql 9.1中找不到adminpack.sql

Joh*_*ohn 10 postgresql ubuntu postgresql-9.1

我正在尝试安装它并在ubuntu中使用.按照页面安装其他检测包.

Install Server Instrumentation for Postgresql 8.4
To install Server Instrumentation for Postgresql 8.4 you may use the command line and type:
 sudo apt-get install postgresql-contrib

Run the adminpack.sql script, simply type:
 sudo -u postgres psql < /usr/share/postgresql/8.4/contrib/adminpack.sql
Run Code Online (Sandbox Code Playgroud)

但我在9.1版本中找不到adminpack.sql.

Leo*_*rdo 24

在PostgreSQL 9.1及更高版本中,可以通过以下CREATE EXTENSION命令安装扩展:

sudo -u postgres psql
CREATE EXTENSION "adminpack";
Run Code Online (Sandbox Code Playgroud)


Jan*_*rek 4

尝试locate adminpack。但首先,运行updatedb以确保locate数据库是最新的。

sudo updatedb
locate adminpack
Run Code Online (Sandbox Code Playgroud)

输出是:

/usr/lib/postgresql/9.1/lib/adminpack.so
/usr/share/postgresql/9.1/extension/adminpack--1.0.sql
/usr/share/postgresql/9.1/extension/adminpack.control
Run Code Online (Sandbox Code Playgroud)