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.4. auto_explain
F.4.1. Configuration Parameters
F.4.2. Example
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. canopy
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.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. file_fdw
F.12. lt_buffercache
F.12.1. The pg_buffercache View
F.12.2. Sample Output
F.12.3. Authors
F.13. lt_bulkload
F.13.1. Synopsis
F.13.2. Description
F.13.3. Usage
F.13.4. Options
F.13.5. Control Files
F.13.6. Restrictions
F.13.7. Details
F.14. lt_cheat_funcs
F.14.1. Functions
F.14.2. Encoding Conversions
F.14.3. Configuration Parameters
F.15. ltcluster
F.16. lt_cron
F.16.1. What is lt_cron?
F.17. lt_freespacemap
F.17.1. Functions
F.17.2. Sample Output
F.18. lt_hint_plan
F.18.1. Name
F.18.2. Synopsis
F.18.3. Description
F.18.4. The hint table
F.18.5. Details in hinting
F.18.6. Subqueries
F.18.7. Compatible with canopy
F.18.8. Errors
F.18.9. Functional limitations
F.18.10. Hint list
F.19. lt_log_long_xact
F.19.1. Usage
F.20. lt_ope
F.20.1. What is lt_ope?
F.20.2. function usage
F.21. lt_patch
F.21.1. The lt_patch table
F.21.2. Functions
F.21.3. Sample Output
F.22. lt_prewarm
F.22.1. Functions
F.22.2. Configuration Parameters
F.23. lt_proctab
F.23.1. functions
F.24. lt_profile
F.24.1. Concepts
F.24.2. Extension architecture
F.24.3. Prerequisites
F.24.4. Creating Extensions
F.24.5. Privileges
F.24.6. Using lt_profile
F.24.7. Sections of PWR report
F.24.8. Sections of PSH report
F.25. lt_qualstats
F.25.1. Configuration
F.25.2. Updating the extension
F.25.3. Usage
F.26. lt_show_plans
F.26.1. Configuration Parameters
F.26.2. Usage
F.26.3. Functions
F.27. lt_sm
F.27.1. What is lt_sm?
F.27.2. function usage
F.27.3. key management
F.28. lt_sql_inspect
F.28.1. SQL best practices
F.28.2. SQL interception
F.29. lt_standby_forward
F.29.1. Configuration Parameters
F.29.2. Usage
F.29.3. Authentication
F.29.4. Features/Limitations
F.30. lt_stat_activity
F.30.1. Concepts
F.30.2. Prerequisites
F.30.3. Creating Extensions
F.31. lt_stat_statements
F.31.1. The pg_stat_statements View
F.31.2. Functions
F.31.3. Configuration Parameters
F.31.4. Sample Output
F.31.5. Authors
F.32. lt_tempfile
F.33. lt_visibility
F.33.1. Functions
F.34. ltaudit
F.34.1. Introduction
F.34.2. Why ltaudit?
F.34.3. Usage Considerations
F.34.4. Settings
F.34.5. Session Audit Logging
F.34.6. Object Audit Logging
F.34.7. Format
F.34.8. Caveats
F.35. ltcrypto
F.35.1. General Hashing Functions
F.35.2. Password Hashing Functions
F.35.3. PGP Encryption Functions
F.35.4. Raw Encryption Functions
F.35.5. Random-Data Functions
F.35.6. Notes
F.36. ltfce
F.36.1. Features Compatible with all mode
F.36.2. Functions
F.36.3. Operator type compatibility
F.37. ltfincore
F.37.1. DESCRIPTION
F.37.2. EXAMPLES
F.37.3. SYNOPSIS
F.37.4. DOCUMENTATION
F.37.5. DEBUG
F.37.6. REQUIREMENTS
F.37.7. LIMITATIONS
F.38. ltrowlocks
F.38.1. Overview
F.38.2. Sample Output
F.39. ltstattuple
F.39.1. Functions
F.39.2. Authors
F.40. lt_walminer
F.40.1. What is lt_walminer?
F.41. myfce
F.41.1. Features Compatible with Mysql Databases
F.41.2. SQL Functions Reference
F.41.3. Queries
F.42. mysql_fdw
F.42.1. Installation
F.42.2. Enhancements
F.42.3. Usage
F.42.4. Examples
F.43. oracle_fdw
F.43.1. Cookbook
F.43.2. Objects created by the extension
F.43.3. Options
F.43.4. Usage
F.43.5. Internals
F.43.6. Problems
F.44. orafce
F.44.1. Features Compatible with Oracle Databases
F.44.2. Notes on Using orafce
F.44.3. Data Types
F.44.4. Pseudocolumns
F.44.5. Queries
F.44.6. SQL Functions Reference
F.44.7. Package Reference
F.44.8. Transaction behavior
F.44.9. System View Reference
F.45. pageinspect
F.45.1. General Functions
F.45.2. Heap Functions
F.45.3. B-Tree Functions
F.45.4. GIN Functions
F.45.5. Hash Functions
F.46. passwordcheck
F.47. postgres_fdw
F.47.1. FDW Options of postgres_fdw
F.47.2. Connection Management
F.47.3. Transaction Management
F.47.4. Remote Query Optimization
F.47.5. Remote Query Execution Environment
F.47.6. Cross-Version Compatibility
F.47.7. Examples
F.48. rum
F.48.1. Introduction
F.48.2. Common operators and functions
F.48.3. Operator classes
F.49. system_stats
F.49.1. Security
F.49.2. Functions
F.49.3. Detailed output of each functions
F.50. tablefunc
F.50.1. Functions Provided
F.51. tsm_system_rows
F.51.1. Examples
F.52. tsm_system_time
F.52.1. Examples
F.53. uuid-ossp
F.53.1. uuid-ossp Functions
F.54. wal2sql
F.54.1. Configuration
F.54.2. Configuration Parameters
F.54.3. Examples of Parameters
F.54.4. Note
F.55. zhparser
F.55.1. CONFIGURATION
F.55.2. EXAMPLE
F.55.3. Custom dictionary
F.55.4. Custom dictionary 2.1
F.56. pldebugger
F.56.1. Installation
F.56.2. Usage
F.56.3. Architecture
F.57. lt_t3sdk
F.57.1. Installation
F.57.2. Concepts
F.57.3. Functions
F.57.4. Examples
F.58. lt_http
F.58.1. Installation
F.58.2. Concepts
F.58.3. Functions
F.58.4. CURL Options
F.58.5. Keep-Alive and Timeouts
F.58.6. Examples

This appendix and the next one contain information regarding the modules that can be found in the contrib directory of the LightDB distribution. These include porting tools, analysis utilities, and plug-in features that are not part of the core LightDB 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.

If you are using a pre-packaged version of LightDB, these modules are typically made available as a separate subpackage, such as lightdb-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.

English|中文