Supported Versions: Current (16) / 15 / 14 / 13 / 12
Development Versions: 17 / devel
Unsupported versions: 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

Appendix F. Additional Supplied Modules

Table of Contents
F.1. adminpack
F.2. auto_explain
F.3. btree_gin
F.4. btree_gist
F.5. chkpass
F.6. citext
F.7. cube
F.8. dblink
F.9. dict_int
F.10. dict_xsyn
F.11. earthdistance
F.12. fuzzystrmatch
F.13. hstore
F.14. intagg
F.15. intarray
F.16. isn
F.17. lo
F.18. ltree
F.19. oid2name
F.20. pageinspect
F.21. pgbench
F.22. pg_buffercache
F.23. pgcrypto
F.24. pg_freespacemap
F.25. pgrowlocks
F.26. pg_standby
F.27. pg_stat_statements
F.28. pgstattuple
F.29. pg_trgm
F.30. seg
F.31. spi
F.32. sslinfo
F.33. tablefunc
F.34. test_parser
F.35. tsearch2
F.36. uuid-ossp
F.37. vacuumlo
F.38. xml2

This appendix contains information regarding the modules that can be found in the contrib directory of the PostgreSQL distribution. These include porting tools, analysis utilities, and plug-in features that are not part of the core PostgreSQL system, mainly because they address a limited audience or are too experimental to be part of the main source tree. This does not preclude their usefulness.

When building from the source distribution, these modules are not built automatically. You can build and install all of them by running:

gmake install

in the contrib directory of a configured source tree; or to build and install just one selected module, do the same in that module's subdirectory. Many of the modules have regression tests, which can be executed by running:

gmake installcheck

once you have a PostgreSQL server running. (Note that gmake check is not supported; you must have an operational database server to perform these tests, and you must have built and installed the module(s) to be tested.)

If you are using a pre-packaged version of PostgreSQL, these modules are typically made available as a separate subpackage, such as postgresql-contrib.

Many modules supply new user-defined functions, operators, or types. To make use of one of these modules, after you have installed the code you need to register the new objects in the database system by running the SQL commands in the .sql file supplied by the module. For example,

psql -d dbname -f SHAREDIR/contrib/module.sql

Here, SHAREDIR means the installation's "share" directory (pg_config --sharedir will tell you what this is). In most cases the script must be run by a database superuser.

You need to run the .sql file in each database that you want the module's facilities to be available in. Alternatively, run it in database template1 so that the module will be copied into subsequently-created databases by default.

You can modify the first command in the .sql file to determine which schema within the database the module's objects will be created in. By default, they will be placed in public.

After a major-version upgrade of PostgreSQL, run the installation script again, even though the module's objects might have been brought forward from the old installation by dump and restore. This ensures that any new functions will be available and any needed corrections will be applied.