Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot find adminpack.sql in postgresql 9.1

I'm trying to get it installed and use in ubuntu. Was following this page to install the additional instrumentation packages.

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

But I couldn't find adminpack.sql in 9.1 version.

like image 427
John Avatar asked May 09 '12 09:05

John


2 Answers

In PostgreSQL 9.1 and later, extensions can be installed via the CREATE EXTENSION command:

sudo -u postgres psql
CREATE EXTENSION "adminpack";
like image 90
Leonardo Avatar answered Oct 09 '22 03:10

Leonardo


Try locate adminpack. But first, run updatedb to make sure the locate database is up to date.

sudo updatedb
locate adminpack

The output is:

/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
like image 30
Jan Marek Avatar answered Oct 09 '22 03:10

Jan Marek