Appendix F. Additional Supplied Modules and Extensions#
Appendix F. Additional Supplied Modules and Extensions
Table of Contents
- F.1. amcheck — tools to verify table and index consistency
- F.2. auth_delay — pause on authentication failure
- F.3. auto_dump — extension with ProcessInterrupts hook
- F.4. auto_explain — log execution plans of slow queries
- F.5. basebackup_to_shell — example "shell" pg_basebackup module
- F.6. basic_archive — an example WAL archive module
- F.7. bloom — bloom filter index access method
- F.8. btree_gin — GIN operator classes with B-tree behavior
- F.9. btree_gist — GiST operator classes with B-tree behavior
- F.10. citext — a case-insensitive character string type
- F.11. spi — Server Programming Interface features/examples
- F.12. credcheck — Tantor SE-1C username/password checks
- F.13. cube — a multi-dimensional cube data type
- F.14. dbcopies_decoding — database copy mechanism and data accelerator
- F.15. dblink — connect to other PostgreSQL databases
- 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 — example full-text search dictionary for integers
- F.17. dict_xsyn — example synonym full-text search dictionary
- F.18. earthdistance — calculate great-circle distances
- F.19. fasttrun — function to truncate temporary tables without growing
pg_classsize - F.20. file_fdw — access data files in the server's file system
- F.21. fulleq — equivalence operator for compatibility with Microsoft SQL Server
- F.22. fuzzystrmatch — determine string similarities and distance
- F.23. hstore — hstore key/value datatype
- F.24. HypoPG — support for hypothetical indexes
- F.25. intagg — integer aggregator and enumerator
- F.26. intarray — manipulate arrays of integers
- F.27. isn — data types for international standard numbers (ISBN, EAN, UPC, etc.)
- F.28. lo — manage large objects
- F.29. ltree — hierarchical tree-like data type
- F.30. mchar — additional data types for compatibility with Microsoft SQL Server (MS SQL)
- F.31. online_analyze — statistic collection right after INSERT/UPDATE/DELETE/SELECT
- F.32. pageinspect — low-level inspection of database pages
- F.33. page_repair — individual page repair using standby’s data
- F.34. passwordcheck — verify password strength
- F.35. pgAudit — detailed session and/or object audit logging
- F.36. pgauditlogtofile — pgAudit addon for redirect audit log lines to an independent file
- F.37. pg_buffercache — inspect Tantor SE-1C buffer cache state
- F.37.1. The
pg_buffercacheView - F.37.2. The
pg_buffercache_numaView - F.37.3. The
pg_buffercache_summary()Function - F.37.4. The
pg_buffercache_usage_counts()Function - F.37.5. The
pg_buffercache_evict()Function - F.37.6. The
pg_buffercache_evict_relation()Function - F.37.7. The
pg_buffercache_evict_all()Function - F.37.8. Sample Output
- F.37.9. Authors
- F.37.1. The
- F.38. pg_cron — cron-based job scheduler working within the database
- F.39. pgcrypto — cryptographic functions
- F.40. pg_csm — estimating compressibility of tables and indexes using CSM
- F.41. pg_freespacemap — examine the free space map
- F.42. pg_hint_plan — configuring plans of SQL queries in SQL comments
- F.43. pg_logicalinspect — logical decoding components inspection
- F.44. pg_overexplain — allow EXPLAIN to dump even more details
- F.45. pg_prewarm — preload relation data into buffer caches
- F.46. pg_query_id — manipulate aspects of query id computation
- F.47. pg_repack — remove bloat from tables and indexes
- F.48. pgrowlocks — show a table's row locking information
- F.49. pg_sample_profile — sample-based profiling of database activity
- F.50. pg_stat_advisor — Tantor SE-1C advisor to create extended statistics
- F.51. pg_stat_kcache — statistics about real reads and writes
- F.52. pg_stat_statements — track statistics of SQL planning and execution
- F.53. pgstattuple — obtain tuple-level statistics
- F.54. pg_store_plans — means for tracking execution plan statistics of all SQL statements
- F.55. pg_surgery — perform low-level surgery on relation data
- F.56. pg_trace — Real-time filtered query tracing for Tantor SE-1C
- F.57. pg_trgm — support for similarity of text using trigram matching
- F.58. pg_visibility — visibility map information and utilities
- F.59. pg_wait_sampling — sampling based statistics of wait events
- F.60. pg_walinspect — low-level WAL inspection
- F.61. plantuner — planner hints
- F.62. postgres_fdw — access data stored in external Tantor SE-1C servers
- F.62.1. FDW Options of postgres_fdw
- F.62.2. Functions
- F.62.3. Connection Management
- F.62.4. Transaction Management
- F.62.5. Remote Query Optimization
- F.62.6. Remote Query Execution Environment
- F.62.7. Cross-Version Compatibility
- F.62.8. Wait Events
- F.62.9. Configuration Parameters
- F.62.10. Examples
- F.62.11. Author
- F.63. seg — a datatype for line segments or floating point intervals
- F.64. sepgsql — SELinux-, label-based mandatory access control (MAC) security module
- F.65. sslinfo — obtain client SSL information
- F.66. tablefunc — functions that return tables (
crosstaband others) - F.67. tcn — a trigger function to notify listeners of changes to table content
- F.68. test_decoding — SQL-based test/example module for WAL logical decoding
- F.69. transp_anon — mask or replace personally identifiable information or commercially sensitive data
- F.69.1. Overview
- F.69.2. Definitions of the terms used in this project
- F.69.3. Anonymization & Data Masking for Tantor SE-1C
- F.69.4. Server startup requirement
- F.69.5. Configuration
- F.69.6. Declare masking rules
- F.69.7. Masking functions
- F.69.8. Dynamic masking
- F.69.9. Generalization
- F.69.10. Custom Fake Data
- F.69.11. Performances
- F.69.12. Security
- F.69.13. Examples
- F.70. tsm_system_rows —
the
SYSTEM_ROWSsampling method forTABLESAMPLE - F.71. tsm_system_time —
the
SYSTEM_TIMEsampling method forTABLESAMPLE - F.72. unaccent — a text search dictionary which removes diacritics
- F.73. uuid-ossp — a UUID generator
- F.74. xml2 — XPath querying and XSLT functionality
This appendix and the next one contain information on the
optional components
found in the contrib directory of the
Tantor SE-1C distribution.
These include porting tools, analysis utilities,
and plug-in features that are not part of the core PostgreSQL system.
They are separate 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 module
libraries found in
contrib. Appendix G covers utility
programs.
Many components supply new user-defined functions, operators, or types, packaged as extensions. To make use of one of these extensions, 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 extension_name;
This command registers the new SQL objects in the current database only,
so you need to run it in every database in which you want
the extension's facilities to be available. Alternatively, run it in
database template1 so that the extension will be copied into
subsequently-created databases by default.
For all extensions, the CREATE EXTENSION command must be
run by a database superuser, unless the extension is
considered “trusted”. Trusted extensions can be run by any
user who has CREATE privilege on the current
database. Extensions that are trusted are identified as such in the
sections that follow. Generally, trusted extensions are ones that cannot
provide access to outside-the-database functionality.
The following extensions are trusted in a default installation:
| btree_gin | fuzzystrmatch | ltree | tcn |
| btree_gist | hstore | pgcrypto | tsm_system_rows |
| citext | intarray | pg_trgm | tsm_system_time |
| cube | isn | seg | unaccent |
| dict_int | lo | tablefunc | uuid-ossp |
Many extensions allow you to install their objects in a schema of your
choice. To do that, add SCHEMA
to the schema_nameCREATE 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 components 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 component for details.
- F.1. amcheck — tools to verify table and index consistency
- F.2. auth_delay — pause on authentication failure
- F.3. auto_dump — extension with ProcessInterrupts hook
- F.4. auto_explain — log execution plans of slow queries
- F.5. basebackup_to_shell — example “shell” pg_basebackup module
- F.6. basic_archive — an example WAL archive module
- F.7. bloom — bloom filter index access method
- F.8. btree_gin — GIN operator classes with B-tree behavior
- F.9. btree_gist — GiST operator classes with B-tree behavior
- F.10. citext — a case-insensitive character string type
- F.11. spi — Server Programming Interface features/examples
- F.12. credcheck — Tantor SE-1C username/password checks
- F.13. cube — a multi-dimensional cube data type
- F.14. dbcopies_decoding — database copy mechanism and data accelerator
- F.15. dblink — connect to other PostgreSQL databases
- F.16. dict_int — example full-text search dictionary for integers
- F.17. dict_xsyn — example synonym full-text search dictionary
- F.18. earthdistance — calculate great-circle distances
- F.19. fasttrun — function to truncate temporary tables without growing pg_class size
- F.20. file_fdw — access data files in the server’s file system
- F.21. fulleq — equivalence operator for compatibility with Microsoft SQL Server
- F.22. fuzzystrmatch — determine string similarities and distance
- F.23. hstore — hstore key/value datatype
- F.24. HypoPG — support for hypothetical indexes
- F.25. intagg — integer aggregator and enumerator
- F.26. intarray — manipulate arrays of integers
- F.27. isn — data types for international standard numbers (ISBN, EAN, UPC, etc.)
- F.28. lo — manage large objects
- F.29. ltree — hierarchical tree-like data type
- F.30. mchar — additional data types for compatibility with Microsoft SQL Server (MS SQL)
- F.31. online_analyze — statistic collection right after INSERT/UPDATE/DELETE/SELECT
- F.32. pageinspect — low-level inspection of database pages
- F.33. page_repair — individual page repair using standby’s data
- F.34. passwordcheck — verify password strength
- F.35. pgAudit — detailed session and/or object audit logging
- F.36. pgauditlogtofile — pgAudit addon for redirect audit log lines to an independent file
- F.37. pg_buffercache — inspect Tantor SE-1C buffer cache state
- F.38. pg_cron — cron-based job scheduler working within the database
- F.39. pgcrypto — cryptographic functions
- F.40. pg_csm — estimating compressibility of tables and indexes using CSM
- F.41. pg_freespacemap — examine the free space map
- F.42. pg_hint_plan — configuring plans of SQL queries in SQL comments
- F.43. pg_logicalinspect — logical decoding components inspection
- F.44. pg_overexplain — allow EXPLAIN to dump even more details
- F.45. pg_prewarm — preload relation data into buffer caches
- F.46. pg_query_id — manipulate aspects of query id computation
- F.47. pg_repack — remove bloat from tables and indexes
- F.48. pgrowlocks — show a table’s row locking information
- F.49. pg_sample_profile — sample-based profiling of database activity
- F.50. pg_stat_advisor — Tantor SE-1C advisor to create extended statistics
- F.51. pg_stat_kcache — statistics about real reads and writes
- F.52. pg_stat_statements — track statistics of SQL planning and execution
- F.53. pgstattuple — obtain tuple-level statistics
- F.54. pg_store_plans — means for tracking execution plan statistics of all SQL statements
- F.55. pg_surgery — perform low-level surgery on relation data
- F.56. pg_trace — Real-time filtered query tracing for Tantor SE-1C
- F.57. pg_trgm — support for similarity of text using trigram matching
- F.58. pg_visibility — visibility map information and utilities
- F.59. pg_wait_sampling — sampling based statistics of wait events
- F.60. pg_walinspect — low-level WAL inspection
- F.61. plantuner — planner hints
- F.62. postgres_fdw — access data stored in external Tantor SE-1C servers
- F.63. seg — a datatype for line segments or floating point intervals
- F.64. sepgsql — SELinux-, label-based mandatory access control (MAC) security module
- F.65. sslinfo — obtain client SSL information
- F.66. tablefunc — functions that return tables (crosstab and others)
- F.67. tcn — a trigger function to notify listeners of changes to table content
- F.68. test_decoding — SQL-based test/example module for WAL logical decoding
- F.69. transp_anon — mask or replace personally identifiable information or commercially sensitive data
- F.70. tsm_system_rows — the SYSTEM_ROWS sampling method for TABLESAMPLE
- F.71. tsm_system_time — the SYSTEM_TIME sampling method for TABLESAMPLE
- F.72. unaccent — a text search dictionary which removes diacritics
- F.73. uuid-ossp — a UUID generator
- F.74. xml2 — XPath querying and XSLT functionality