Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Overview of this book

Table of Contents (19 chapters)
PostgreSQL 9 Administration Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Managing installed extensions


In the last two recipes, we showed you how to install external modules in PostgreSQL to augment its capabilities. Actually, the last recipe came in two variants, depending on whether we can use the newly introduced extension infrastructure.

In this recipe, we will show you some more capabilities offered by the extension infrastructure. Everything here applies only to PostgreSQL version 9.1 and later.

Getting ready

You only need to ensure that your PostgreSQL version is 9.1 or later.

How to do it…

First, we list all available extensions:

postgres=# \x on
Expanded display is on.
postgres=# SELECT *
postgres-# FROM pg_available_extensions
postgres-# ORDER BY name;
-[ RECORD 1 ]-----+--------------------------------------------------
name              | adminpack
default_version   | 1.0
installed_version | 
comment           | administrative functions for PostgreSQL
-[ RECORD 2 ]-----+--------------------------------------------------
name              | autoinc
default_version...