September 26, 2024: PostgreSQL 17 Released!
Supported Versions: Current (17) / 16 / 15 / 14 / 13 / 12
Development Versions: devel
Unsupported versions: 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3

Appendix F. Additional Supplied Modules

Table of Contents

F.1. adminpack
F.2. amcheck
F.2.1. Functions
F.2.2. Optional heapallindexed Verification
F.2.3. Using amcheck Effectively
F.2.4. Repairing Corruption
F.3. auth_delay
F.3.1. Configuration Parameters
F.3.2. Author
F.4. auto_explain
F.4.1. Configuration Parameters
F.4.2. Example
F.4.3. Author
F.5. bloom
F.5.1. Parameters
F.5.2. Examples
F.5.3. Operator Class Interface
F.5.4. Limitations
F.5.5. Authors
F.6. btree_gin
F.6.1. Example Usage
F.6.2. Authors
F.7. btree_gist
F.7.1. Example Usage
F.7.2. Authors
F.8. citext
F.8.1. Rationale
F.8.2. How to Use It
F.8.3. String Comparison Behavior
F.8.4. Limitations
F.8.5. Author
F.9. cube
F.9.1. Syntax
F.9.2. Precision
F.9.3. Usage
F.9.4. Defaults
F.9.5. Notes
F.9.6. Credits
F.10. dblink
dblink_connect — opens a persistent connection to a remote database
dblink_connect_u — opens a persistent connection to a remote database, insecurely
dblink_disconnect — closes a persistent connection to a remote database
dblink — executes a query in a remote database
dblink_exec — executes a command in a remote database
dblink_open — opens a cursor in a remote database
dblink_fetch — returns rows from an open cursor in a remote database
dblink_close — closes a cursor in a remote database
dblink_get_connections — returns the names of all open named dblink connections
dblink_error_message — gets last error message on the named connection
dblink_send_query — sends an async query to a remote database
dblink_is_busy — checks if connection is busy with an async query
dblink_get_notify — retrieve async notifications on a connection
dblink_get_result — gets an async query result
dblink_cancel_query — cancels any active query on the named connection
dblink_get_pkey — returns the positions and field names of a relation's primary key fields
dblink_build_sql_insert — builds an INSERT statement using a local tuple, replacing the primary key field values with alternative supplied values
dblink_build_sql_delete — builds a DELETE statement using supplied values for primary key field values
dblink_build_sql_update — builds an UPDATE statement using a local tuple, replacing the primary key field values with alternative supplied values
F.11. dict_int
F.11.1. Configuration
F.11.2. Usage
F.12. dict_xsyn
F.12.1. Configuration
F.12.2. Usage
F.13. earthdistance
F.13.1. Cube-Based Earth Distances
F.13.2. Point-Based Earth Distances
F.14. file_fdw
F.15. fuzzystrmatch
F.15.1. Soundex
F.15.2. Levenshtein
F.15.3. Metaphone
F.15.4. Double Metaphone
F.16. hstore
F.16.1. hstore External Representation
F.16.2. hstore Operators and Functions
F.16.3. Indexes
F.16.4. Examples
F.16.5. Statistics
F.16.6. Compatibility
F.16.7. Transforms
F.16.8. Authors
F.17. intagg
F.17.1. Functions
F.17.2. Sample Uses
F.18. intarray
F.18.1. intarray Functions and Operators
F.18.2. Index Support
F.18.3. Example
F.18.4. Benchmark
F.18.5. Authors
F.19. isn
F.19.1. Data Types
F.19.2. Casts
F.19.3. Functions and Operators
F.19.4. Examples
F.19.5. Bibliography
F.19.6. Author
F.20. lo
F.20.1. Rationale
F.20.2. How to Use It
F.20.3. Limitations
F.20.4. Author
F.21. ltree
F.21.1. Definitions
F.21.2. Operators and Functions
F.21.3. Indexes
F.21.4. Example
F.21.5. Transforms
F.21.6. Authors
F.22. pageinspect
F.22.1. General Functions
F.22.2. Heap Functions
F.22.3. B-Tree Functions
F.22.4. BRIN Functions
F.22.5. GIN Functions
F.22.6. Hash Functions
F.23. passwordcheck
F.24. pg_buffercache
F.24.1. The pg_buffercache View
F.24.2. Sample Output
F.24.3. Authors
F.25. pgcrypto
F.25.1. General Hashing Functions
F.25.2. Password Hashing Functions
F.25.3. PGP Encryption Functions
F.25.4. Raw Encryption Functions
F.25.5. Random-Data Functions
F.25.6. Notes
F.25.7. Author
F.26. pg_freespacemap
F.26.1. Functions
F.26.2. Sample Output
F.26.3. Author
F.27. pg_prewarm
F.27.1. Functions
F.27.2. Configuration Parameters
F.27.3. Author
F.28. pgrowlocks
F.28.1. Overview
F.28.2. Sample Output
F.28.3. Author
F.29. pg_stat_statements
F.29.1. The pg_stat_statements View
F.29.2. Functions
F.29.3. Configuration Parameters
F.29.4. Sample Output
F.29.5. Authors
F.30. pgstattuple
F.30.1. Functions
F.30.2. Authors
F.31. pg_trgm
F.31.1. Trigram (or Trigraph) Concepts
F.31.2. Functions and Operators
F.31.3. GUC Parameters
F.31.4. Index Support
F.31.5. Text Search Integration
F.31.6. References
F.31.7. Authors
F.32. pg_visibility
F.32.1. Functions
F.32.2. Author
F.33. postgres_fdw
F.33.1. FDW Options of postgres_fdw
F.33.2. Connection Management
F.33.3. Transaction Management
F.33.4. Remote Query Optimization
F.33.5. Remote Query Execution Environment
F.33.6. Cross-Version Compatibility
F.33.7. Examples
F.33.8. Author
F.34. seg
F.34.1. Rationale
F.34.2. Syntax
F.34.3. Precision
F.34.4. Usage
F.34.5. Notes
F.34.6. Credits
F.35. sepgsql
F.35.1. Overview
F.35.2. Installation
F.35.3. Regression Tests
F.35.4. GUC Parameters
F.35.5. Features
F.35.6. Sepgsql Functions
F.35.7. Limitations
F.35.8. External Resources
F.35.9. Author
F.36. spi
F.36.1. refint — Functions for Implementing Referential Integrity
F.36.2. autoinc — Functions for Autoincrementing Fields
F.36.3. insert_username — Functions for Tracking Who Changed a Table
F.36.4. moddatetime — Functions for Tracking Last Modification Time
F.37. sslinfo
F.37.1. Functions Provided
F.37.2. Author
F.38. tablefunc
F.38.1. Functions Provided
F.38.2. Author
F.39. tcn
F.40. test_decoding
F.41. tsm_system_rows
F.41.1. Examples
F.42. tsm_system_time
F.42.1. Examples
F.43. unaccent
F.43.1. Configuration
F.43.2. Usage
F.43.3. Functions
F.44. uuid-ossp
F.44.1. uuid-ossp Functions
F.44.2. Building uuid-ossp
F.44.3. Author
F.45. xml2
F.45.1. Deprecation Notice
F.45.2. Description of Functions
F.45.3. xpath_table
F.45.4. XSLT Functions
F.45.5. Author

This appendix and the next one contain 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.

This appendix covers extensions and other server plug-in modules found in contrib. Appendix G covers utility programs.

When building from the source distribution, these components are not built automatically, unless you build the "world" target (see Step 2). You can build and install all of them by running:

make
make 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:

make check

before installation or

make installcheck

once you have a PostgreSQL server running.

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 SQL objects in the database system. In PostgreSQL 9.1 and later, this is done by executing a CREATE EXTENSION command. In a fresh database, you can simply do

CREATE EXTENSION module_name;

This command must be run by a database superuser. This registers the new SQL objects in the current database only, so you need to run this command in each database that you want the module's facilities to be available in. Alternatively, run it in database template1 so that the extension will be copied into subsequently-created databases by default.

Many modules allow you to install their objects in a schema of your choice. To do that, add SCHEMA schema_name to the CREATE EXTENSION command. By default, the objects will be placed in your current creation target schema, which in turn defaults to public.

If your database was brought forward by dump and reload from a pre-9.1 version of PostgreSQL, and you had been using the pre-9.1 version of the module in it, you should instead do

CREATE EXTENSION module_name FROM unpackaged;

This will update the pre-9.1 objects of the module into a proper extension object. Future updates to the module will be managed by ALTER EXTENSION. For more information about extension updates, see Section 37.17.

Note, however, that some of these modules are not extensions in this sense, but are loaded into the server in some other way, for instance by way of shared_preload_libraries. See the documentation of each module for details.

Submit correction

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.