Database Reference
In-Depth Information
This command searches through
contrib
, finds all components for the extension, and
packages them into a new extension object so it appears in the
pg_available_exten
sions
list as being installed.
You can still install an extension in a database with psql without first connecting to the
database:
psql -p 5432 -d
mydb
-c "CREATE EXTENSION fuzzystrmatch;"
This command leaves the old functions in the
contrib
schema intact but removes them
from being a part of a database backup.
Common Extensions
Many extensions come packaged with PostgreSQL but are not installed by default. Some
past extensions have gained enough traction to become part of the PostgreSQL core
database installation, so if you're upgrading from an ancient version, you may get their
functionality without needing any extensions.
Popular extensions
Since version 9.1, PostgreSQL prefers the extension model to deliver all add-ons. These
include basic extensions consisting only of functions and types, as well as procedural
languages (PLs), index types, and foreign data wrappers. In this section we list the most
popular extensions (some say, “must-have” extensions) that PostgreSQL doesn't install
into your database by default. Depending on your PostgreSQL distribution, you'll find
many of these already available on your server:
Provides GiST index-operator classes that implement B-Tree equivalent behavior
for common B-Tree services data types. See
“PostgreSQL Stock Indexes” on page 113
for more detail.
Provides GIN index-operator classes that implement B-Tree equivalent behavior
for common B-Tree serviced data types. See
“PostgreSQL Stock Indexes” on page
113
for more detail.
Elevates PostgreSQL to a
PostGIS in Action
state-of-the-art spatial database out‐
rivaling all commercial options. If you deal with standard OGC GIS data, demo‐
graphic statistics data, or geocoding, you don't want to be without this one. You can
an extension, weighing in at more than 800 functions, types, and spatial indexes.