F. 延伸支援模組

Table of Contents

F.1. adminpack

F.2. amcheck

F.2.1. Functions

F.2.2. Usingamcheckeffectively

F.2.3. 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. chkpass

F.8.1. Author

F.9. citext

F.9.1. Rationale

F.9.2. How to Use It

F.9.3. String Comparison Behavior

F.9.4. Limitations

F.9.5. Author

F.10. cube

F.10.1. Syntax

F.10.2. Precision

F.10.3. Usage

F.10.4. Defaults

F.10.5. Notes

F.10.6. Credits

F.11. dblink


— opens a persistent connection to a remote database


— opens a persistent connection to a remote database, insecurely


— closes a persistent connection to a remote database


— executes a query in a remote database


— executes a command in a remote database


— opens a cursor in a remote database


— returns rows from an open cursor in a remote database


— closes a cursor in a remote database


— returns the names of all open named dblink connections


— gets last error message on the named connection


— sends an async query to a remote database


— checks if connection is busy with an async query


— retrieve async notifications on a connection


— gets an async query result


— cancels any active query on the named connection


— returns the positions and field names of a relation's primary key fields


— builds an INSERT statement using a local tuple, replacing the primary key field values with alternative supplied values


— builds a DELETE statement using supplied values for primary key field values


— builds an UPDATE statement using a local tuple, replacing the primary key field values with alternative supplied values

F.12. dict_int

F.12.1. Configuration

F.12.2. Usage

F.13. dict_xsyn

F.13.1. Configuration

F.13.2. Usage

F.14. earthdistance

F.14.1. Cube-based Earth Distances

F.14.2. Point-based Earth Distances

F.15. file_fdw

F.16. fuzzystrmatch

F.16.1. Soundex

F.16.2. Levenshtein

F.16.3. Metaphone

F.16.4. Double Metaphone

F.17. hstore

F.17.1.hstoreExternal Representation

F.17.2.hstoreOperators and Functions

F.17.3. Indexes

F.17.4. Examples

F.17.5. Statistics

F.17.6. Compatibility

F.17.7. Transforms

F.17.8. Authors

F.18. intagg

F.18.1. Functions

F.18.2. Sample Uses

F.19. intarray

F.19.1.intarrayFunctions and Operators

F.19.2. Index Support

F.19.3. Example

F.19.4. Benchmark

F.19.5. Authors

F.20. isn

F.20.1. Data Types

F.20.2. Casts

F.20.3. Functions and Operators

F.20.4. Examples

F.20.5. Bibliography

F.20.6. Author

F.21. lo

F.21.1. Rationale

F.21.2. How to Use It

F.21.3. Limitations

F.21.4. Author

F.22. ltree

F.22.1. Definitions

F.22.2. Operators and Functions

F.22.3. Indexes

F.22.4. Example

F.22.5. Transforms

F.22.6. Authors

F.23. pageinspect

F.23.1. General Functions

F.23.2. B-tree Functions

F.23.3. BRIN Functions

F.23.4. GIN Functions

F.23.5. Hash Functions

F.24. passwordcheck

F.25. pg_buffercache

F.25.1. Thepg_buffercacheView

F.25.2. Sample Output

F.25.3. Authors

F.26. pgcrypto

F.26.1. General Hashing Functions

F.26.2. Password Hashing Functions

F.26.3. PGP Encryption Functions

F.26.4. Raw Encryption Functions

F.26.5. Random-Data Functions

F.26.6. Notes

F.26.7. Author

F.27. pg_freespacemap

F.27.1. Functions

F.27.2. Sample Output

F.27.3. Author

F.28. pg_prewarm

F.28.1. Functions

F.28.2. Author

F.29. pgrowlocks

F.29.1. Overview

F.29.2. Sample Output

F.29.3. Author

F.30. pg_stat_statements

F.30.1. Thepg_stat_statementsView

F.30.2. Functions

F.30.3. Configuration Parameters

F.30.4. Sample Output

F.30.5. Authors

F.31. pgstattuple

F.31.1. Functions

F.31.2. Authors

F.32. pg_trgm

F.32.1. Trigram (or Trigraph) Concepts

F.32.2. Functions and Operators

F.32.3. GUC Parameters

F.32.4. Index Support

F.32.5. Text Search Integration

F.32.6. References

F.32.7. Authors

F.33. pg_visibility

F.33.1. Functions

F.33.2. Author

F.34. postgres_fdw

F.34.1. FDW Options of postgres_fdw

F.34.2. Connection Management

F.34.3. Transaction Management

F.34.4. Remote Query Optimization

F.34.5. Remote Query Execution Environment

F.34.6. Cross-Version Compatibility

F.34.7. Examples

F.34.8. Author

F.35. seg

F.35.1. Rationale

F.35.2. Syntax

F.35.3. Precision

F.35.4. Usage

F.35.5. Notes

F.35.6. Credits

F.36. sepgsql

F.36.1. Overview

F.36.2. Installation

F.36.3. Regression Tests

F.36.4. GUC Parameters

F.36.5. Features

F.36.6. Sepgsql Functions

F.36.7. Limitations

F.36.8. External Resources

F.36.9. Author

F.37. spi

F.37.1. refint — Functions for Implementing Referential Integrity

F.37.2. timetravel — Functions for Implementing Time Travel

F.37.3. autoinc — Functions for Autoincrementing Fields

F.37.4. insert_username — Functions for Tracking Who Changed a Table

F.37.5. moddatetime — Functions for Tracking Last Modification Time

F.38. sslinfo

F.38.1. Functions Provided

F.38.2. Author

F.39. tablefunc

F.39.1. Functions Provided

F.39.2. Author

F.40. tcn

F.41. test_decoding

F.42. tsm_system_rows

F.42.1. Examples

F.43. tsm_system_time

F.43.1. Examples

F.44. unaccent

F.44.1. Configuration

F.44.2. Usage

F.44.3. Functions

F.45. uuid-ossp


F.45.2. Buildinguuid-ossp

F.45.3. Author

F.46. xml2

F.46.1. Deprecation Notice

F.46.2. Description of Functions


F.46.4. XSLT Functions

F.46.5. Author

This appendix and the next one contain information regarding the modules that can be found in thecontribdirectory of thePostgreSQLdistribution. 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 incontrib.Appendix Gcovers utility programs.

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

make install

in thecontribdirectory 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 aPostgreSQLserver running.

If you are using a pre-packaged version ofPostgreSQL, these modules are typically made available as a separate subpackage, such aspostgresql-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. InPostgreSQL9.1 and later, this is done by executing aCREATE EXTENSIONcommand. In a fresh database, you can simply do


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 databasetemplate1so 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, addSCHEMA_schema_name_to theCREATE EXTENSIONcommand. By default, the objects will be placed in your current creation target schema, typicallypublic.

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

 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 byALTER EXTENSION. For more information about extension updates, seeSection 37.15.

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 ofshared_preload_libraries. See the documentation of each module for details.

Last updated