Appendix F. Additional Supplied Modules#

Appendix F. Additional Supplied Modules

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. basebackup_to_shell
F.5.1. Configuration Parameters
F.5.2. Author
F.6. basic_archive
F.6.1. Configuration Parameters
F.6.2. Notes
F.6.3. Author
F.7. bloom
F.7.1. Parameters
F.7.2. Examples
F.7.3. Operator Class Interface
F.7.4. Limitations
F.7.5. Authors
F.8. btree_gin
F.8.1. Example Usage
F.8.2. Authors
F.9. btree_gist
F.9.1. Example Usage
F.9.2. Authors
F.10. citext
F.10.1. Rationale
F.10.2. How to Use It
F.10.3. String Comparison Behavior
F.10.4. Limitations
F.10.5. Author
F.11. Citus Optimized Row Columnar (ORC)
F.11.1. About Citus Columnar
F.11.2. Into
F.11.3. Columnar Installation
F.11.4. Columnar basic principles
F.11.5. Usage of the Table Access Method Functionality
F.11.6. Columnar Usage
F.11.7. Performance Microbenchmark
F.11.8. Common recomendations
F.11.9. Working with Time Series Data
F.12. spi
F.12.1. refint — Functions for Implementing Referential Integrity
F.12.2. autoinc — Functions for Autoincrementing Fields
F.12.3. insert_username — Functions for Tracking Who Changed a Table
F.12.4. moddatetime — Functions for Tracking Last Modification Time
F.13. credcheck
F.13.1. About credcheck
F.13.2. Description
F.13.3. Installation
F.13.4. Checks
F.13.5. Examples
F.13.6. Password reuse policy
F.13.7. Authentication failure ban
F.13.8. Limitations
F.13.9. Authors
F.13.10. License
F.13.11. Credits
F.14. cube
F.14.1. Syntax
F.14.2. Precision
F.14.3. Usage
F.14.4. Defaults
F.14.5. Notes
F.14.6. Credits
F.15. 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.16. dict_int
F.16.1. Configuration
F.16.2. Usage
F.17. dict_xsyn
F.17.1. Configuration
F.17.2. Usage
F.18. earthdistance
F.18.1. Cube-Based Earth Distances
F.18.2. Point-Based Earth Distances
F.19. file_fdw
F.20. fuzzystrmatch
F.20.1. Soundex
F.20.2. Levenshtein
F.20.3. Metaphone
F.20.4. Double Metaphone
F.21. hstore
F.21.1. hstore External Representation
F.21.2. hstore Operators and Functions
F.21.3. Indexes
F.21.4. Examples
F.21.5. Statistics
F.21.6. Compatibility
F.21.7. Transforms
F.21.8. Authors
F.22. HypoPG
F.22.1. About HypoPG
F.22.2. Installation
F.22.3. Updating the extension
F.22.4. Usage
F.23. intagg
F.23.1. Functions
F.23.2. Sample Uses
F.24. intarray
F.24.1. intarray Functions and Operators
F.24.2. Index Support
F.24.3. Example
F.24.4. Benchmark
F.24.5. Authors
F.25. isn
F.25.1. Data Types
F.25.2. Casts
F.25.3. Functions and Operators
F.25.4. Examples
F.25.5. Bibliography
F.25.6. Author
F.26. lo
F.26.1. Rationale
F.26.2. How to Use It
F.26.3. Limitations
F.26.4. Author
F.27. ltree
F.27.1. Definitions
F.27.2. Operators and Functions
F.27.3. Indexes
F.27.4. Example
F.27.5. Transforms
F.27.6. Authors
F.28. old_snapshot
F.28.1. Functions
F.29. Orafce Documentation
F.29.1. About Orafce
F.29.2. Oracle functions and Oracle packages
F.29.3. List of format strings for trunc, round functions
F.29.4. Date Functions
F.29.5. oracle.date data type
F.29.6. oracle.date functions
F.29.7. oracle.date Operators
F.29.8. Table dual
F.29.9. Package dbms_output
F.29.10. Package utl_file
F.29.11. package dbms_sql
F.29.12. Package dbms_pipe
F.29.13. Package dbms_alert
F.29.14. Package PLVdate
F.29.15. Package PLVstr and PLVchr
F.29.16. Package PLVsubst
F.29.17. Package DBMS_utility
F.29.18. Package PLVlex
F.29.19. DBMS_ASSERT
F.29.20. PLUnit
F.29.21. Package DBMS_random
F.29.22. Others functions
F.29.23. VARCHAR2 and NVARCHAR2 Support
F.29.24. Triggers
F.29.25. Emulated views
F.29.26. License
F.29.27. Contributors
F.29.28. Orafce - Oracle’s compatibility functions and packages
F.29.29. Chapter 1 Overview
F.29.30. Chapter 2 Notes on Using orafce
F.29.31. Chapter 3 Data Types
F.29.32. Chapter 4 Queries
F.29.33. Chapter 5 SQL Function Reference
F.29.34. Chapter 6 Package Reference
F.29.35. Chapter 7 Transaction behavior
F.29.36. Migration: Chapter 1 Pre-Migration Configuration
F.29.37. Migration: Chapter 2 Migrating Syntax Elements
F.29.38. Migration: Chapter 3 Migrating Functions
F.29.39. Migration: Chapter 4 Migrating SQL Statements
F.29.40. Migration: Chapter 5 Migrating PL/SQL
F.29.41. Migration: Chapter 6 Notes on Using orafce
F.29.42. Appendix A Correspondence with Oracle Databases
F.30. pageinspect
F.30.1. General Functions
F.30.2. Heap Functions
F.30.3. B-Tree Functions
F.30.4. BRIN Functions
F.30.5. GIN Functions
F.30.6. GiST Functions
F.30.7. Hash Functions
F.31. page_repair
F.31.1. About page_repair
F.31.2. Installation
F.31.3. Usage
F.32. passwordcheck
F.33. pgAudit
F.33.1. About pgAudit
F.33.2. Introduction
F.33.3. Why pgAudit?
F.33.4. Usage Considerations
F.33.5. Tantor SE Version Compatibility
F.33.6. Settings
F.33.7. Session Audit Logging
F.33.8. Object Audit Logging
F.33.9. Format
F.33.10. Caveats
F.33.11. Authors
F.34. pgAudit Log to File
F.34.1. About pgauditlogtofile
F.34.2. Description
F.34.3. Installation
F.34.4. Configuration
F.35. pg_background
F.35.1. About pg_background
F.35.2. Postgres Background Worker
F.35.3. Installation
F.35.4. Usage
F.36. pg_buffercache
F.36.1. The pg_buffercache View
F.36.2. Sample Output
F.36.3. Authors
F.37. pg_cron
F.37.1. About pg_cron
F.37.2. What is pg_cron?
F.37.3. Setting up pg_cron
F.38. pgcrypto
F.38.1. General Hashing Functions
F.38.2. Password Hashing Functions
F.38.3. PGP Encryption Functions
F.38.4. Raw Encryption Functions
F.38.5. Random-Data Functions
F.38.6. Notes
F.38.7. Author
F.39. pg_freespacemap
F.39.1. Functions
F.39.2. Sample Output
F.39.3. Author
F.40. pg_hint_plan
F.40.1. About pg_hint_plan
F.40.2. Synopsis
F.40.3. Description
F.40.4. The hint table
F.40.5. Installation
F.40.6. Details in hinting
F.40.7. Errors
F.40.8. Functional limitations
F.40.9. Hints list
F.41. pg_partman
F.41.1. About pg_partman
F.41.2. INSTALLATION
F.41.3. UPGRADE
F.41.4. EXAMPLES
F.41.5. TESTING
F.41.6. Tantor SE Partition Manager Extension (pg_partman)
F.41.7. Short description
F.41.8. Background Worker
F.41.9. Extension Objects
F.41.10. Example Guide On Setting Up Trigger-based Partitioning
F.41.11. Example Guide On Setting Up Native Partitioning
F.41.12. Migrating An Existing Partition Set to PG Partition Manager
F.41.13. Migrating From Trigger-based Partitioning To Native
F.41.14. Add Missing Procedures to an Upgraded Tantor SE Instance
F.41.15. Update Steps
F.42. pg_prewarm
F.42.1. Functions
F.42.2. Configuration Parameters
F.42.3. Author
F.43. PGQ
F.43.1. About pgAudit
F.43.2. Description
F.43.3. What problems is PGQ a solution for?
F.43.4. Installation and setup
F.43.5. Producing Events
F.43.6. Writing a PGQ consumer
F.44. pg_qualstats
F.44.1. About pg_qualstats
F.44.2. Short description
F.44.3. Installation
F.44.4. Configuration
F.44.5. Updating the extension
F.44.6. Usage
F.45. pg_repack
F.45.1. About pg_repack
F.45.2. Short description
F.45.3. Requirements
F.45.4. Installation
F.45.5. Usage
F.45.6. Environment
F.45.7. Examples
F.45.8. Diagnostics
F.45.9. Restrictions
F.45.10. Details
F.45.11. See Also
F.46. pgrowlocks
F.46.1. Overview
F.46.2. Sample Output
F.46.3. Author
F.47. pgsql-http PostgreSQL HTTP Client
F.47.1. About pgsql-http
F.47.2. Examples
F.47.3. Concepts
F.47.4. Functions
F.47.5. CURL Options
F.47.6. Keep-Alive & Timeouts
F.47.7. Why This is a Bad Idea
F.48. pg_stat_statements
F.48.1. The pg_stat_statements View
F.48.2. The pg_stat_statements_info View
F.48.3. Functions
F.48.4. Configuration Parameters
F.48.5. Sample Output
F.48.6. Authors
F.49. pgstattuple
F.49.1. Functions
F.49.2. Authors
F.50. pg_store_plans
F.50.1. About pg_store_plans
F.50.2. Description
F.50.3. The pg_store_plans View
F.50.4. The pg_store_plans View
F.50.5. Functions
F.50.6. Configuration Parameters
F.50.7. Discussion on plan_storage setting
F.50.8. Sample Output
F.51. pg_surgery
F.51.1. Functions
F.51.2. Authors
F.52. pg_trgm
F.52.1. Trigram (or Trigraph) Concepts
F.52.2. Functions and Operators
F.52.3. GUC Parameters
F.52.4. Index Support
F.52.5. Text Search Integration
F.52.6. References
F.52.7. Authors
F.53. pg_variables
F.53.1. About pg_variables
F.53.2. Introduction
F.53.3. Installation
F.53.4. Functions
F.53.5. Scalar variables functions
F.53.6. Array variables functions
F.53.7. Record variable functions
F.53.8. Examples
F.54. pg_visibility
F.54.1. Functions
F.54.2. Author
F.55. pg_wait_sampling
F.55.1. About pg_wait_sampling
F.55.2. Introduction
F.55.3. Installation
F.55.4. Usage
F.55.5. Authors
F.56. pg_walinspect
F.56.1. General Functions
F.56.2. Author
F.57. postgres_fdw
F.57.1. FDW Options of postgres_fdw
F.57.2. Functions
F.57.3. Connection Management
F.57.4. Transaction Management
F.57.5. Remote Query Optimization
F.57.6. Remote Query Execution Environment
F.57.7. Cross-Version Compatibility
F.57.8. Configuration Parameters
F.57.9. Examples
F.57.10. Author
F.58. seg
F.58.1. Rationale
F.58.2. Syntax
F.58.3. Precision
F.58.4. Usage
F.58.5. Notes
F.58.6. Credits
F.59. sepgsql
F.59.1. Overview
F.59.2. Installation
F.59.3. Regression Tests
F.59.4. GUC Parameters
F.59.5. Features
F.59.6. Sepgsql Functions
F.59.7. Limitations
F.59.8. External Resources
F.59.9. Author
F.60. sslinfo
F.60.1. Functions Provided
F.60.2. Author
F.61. tablefunc
F.61.1. Functions Provided
F.61.2. Author
F.62. tcn
F.63. test_decoding
F.64. tsm_system_rows
F.64.1. Examples
F.65. tsm_system_time
F.65.1. Examples
F.66. unaccent
F.66.1. Configuration
F.66.2. Usage
F.66.3. Functions
F.67. uuid-ossp
F.67.1. uuid-ossp Functions
F.67.2. Building uuid-ossp
F.67.3. Author
F.68. xml2
F.68.1. Deprecation Notice
F.68.2. Description of Functions
F.68.3. xpath_table
F.68.4. XSLT Functions
F.68.5. Author

This appendix and the next one contain information regarding the modules that can be found in the contrib directory of the Tantor SE 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.

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 Tantor SE server running.

If you are using a pre-packaged version of Tantor SE, 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. This is done by executing a CREATE EXTENSION command. In a fresh database, you can simply do

CREATE EXTENSION module_name;

This command registers the new SQL objects in the current database only, so you need to run it 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.

For all these modules, CREATE EXTENSION must be run by a database superuser, unless the module is considered trusted, in which case it can be run by any user who has CREATE privilege on the current database. Modules that are trusted are identified as such in the sections that follow. Generally, trusted modules are ones that cannot provide access to outside-the-database functionality.

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.

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.