]> begriffs open source - ai-pg/blob - full-docs/txt/contrib.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / contrib.txt
1
2 Appendix F. Additional Supplied Modules and Extensions
3
4    Table of Contents
5
6    F.1. amcheck — tools to verify table and index consistency
7
8         F.1.1. Functions
9         F.1.2. Optional heapallindexed Verification
10         F.1.3. Using amcheck Effectively
11         F.1.4. Repairing Corruption
12
13    F.2. auth_delay — pause on authentication failure
14
15         F.2.1. Configuration Parameters
16         F.2.2. Author
17
18    F.3. auto_explain — log execution plans of slow queries
19
20         F.3.1. Configuration Parameters
21         F.3.2. Example
22         F.3.3. Author
23
24    F.4. basebackup_to_shell — example "shell" pg_basebackup module
25
26         F.4.1. Configuration Parameters
27         F.4.2. Author
28
29    F.5. basic_archive — an example WAL archive module
30
31         F.5.1. Configuration Parameters
32         F.5.2. Notes
33         F.5.3. Author
34
35    F.6. bloom — bloom filter index access method
36
37         F.6.1. Parameters
38         F.6.2. Examples
39         F.6.3. Operator Class Interface
40         F.6.4. Limitations
41         F.6.5. Authors
42
43    F.7. btree_gin — GIN operator classes with B-tree behavior
44
45         F.7.1. Example Usage
46         F.7.2. Authors
47
48    F.8. btree_gist — GiST operator classes with B-tree behavior
49
50         F.8.1. Example Usage
51         F.8.2. Authors
52
53    F.9. citext — a case-insensitive character string type
54
55         F.9.1. Rationale
56         F.9.2. How to Use It
57         F.9.3. String Comparison Behavior
58         F.9.4. Limitations
59         F.9.5. Author
60
61    F.10. cube — a multi-dimensional cube data type
62
63         F.10.1. Syntax
64         F.10.2. Precision
65         F.10.3. Usage
66         F.10.4. Defaults
67         F.10.5. Notes
68         F.10.6. Credits
69
70    F.11. dblink — connect to other PostgreSQL databases
71
72         dblink_connect — opens a persistent connection to a remote
73                 database
74
75         dblink_connect_u — opens a persistent connection to a remote
76                 database, insecurely
77
78         dblink_disconnect — closes a persistent connection to a remote
79                 database
80
81         dblink — executes a query in a remote database
82         dblink_exec — executes a command in a remote database
83         dblink_open — opens a cursor in a remote database
84         dblink_fetch — returns rows from an open cursor in a remote
85                 database
86
87         dblink_close — closes a cursor in a remote database
88         dblink_get_connections — returns the names of all open named
89                 dblink connections
90
91         dblink_error_message — gets last error message on the named
92                 connection
93
94         dblink_send_query — sends an async query to a remote database
95         dblink_is_busy — checks if connection is busy with an async query
96         dblink_get_notify — retrieve async notifications on a connection
97         dblink_get_result — gets an async query result
98         dblink_cancel_query — cancels any active query on the named
99                 connection
100
101         dblink_get_pkey — returns the positions and field names of a
102                 relation's primary key fields
103
104         dblink_build_sql_insert — builds an INSERT statement using a local
105                 tuple, replacing the primary key field values with
106                 alternative supplied values
107
108         dblink_build_sql_delete — builds a DELETE statement using supplied
109                 values for primary key field values
110
111         dblink_build_sql_update — builds an UPDATE statement using a local
112                 tuple, replacing the primary key field values with
113                 alternative supplied values
114
115    F.12. dict_int — example full-text search dictionary for integers
116
117         F.12.1. Configuration
118         F.12.2. Usage
119
120    F.13. dict_xsyn — example synonym full-text search dictionary
121
122         F.13.1. Configuration
123         F.13.2. Usage
124
125    F.14. earthdistance — calculate great-circle distances
126
127         F.14.1. Cube-Based Earth Distances
128         F.14.2. Point-Based Earth Distances
129
130    F.15. file_fdw — access data files in the server's file system
131    F.16. fuzzystrmatch — determine string similarities and distance
132
133         F.16.1. Soundex
134         F.16.2. Daitch-Mokotoff Soundex
135         F.16.3. Levenshtein
136         F.16.4. Metaphone
137         F.16.5. Double Metaphone
138
139    F.17. hstore — hstore key/value datatype
140
141         F.17.1. hstore External Representation
142         F.17.2. hstore Operators and Functions
143         F.17.3. Indexes
144         F.17.4. Examples
145         F.17.5. Statistics
146         F.17.6. Compatibility
147         F.17.7. Transforms
148         F.17.8. Authors
149
150    F.18. intagg — integer aggregator and enumerator
151
152         F.18.1. Functions
153         F.18.2. Sample Uses
154
155    F.19. intarray — manipulate arrays of integers
156
157         F.19.1. intarray Functions and Operators
158         F.19.2. Index Support
159         F.19.3. Example
160         F.19.4. Benchmark
161         F.19.5. Authors
162
163    F.20. isn — data types for international standard numbers (ISBN, EAN,
164           UPC, etc.)
165
166         F.20.1. Data Types
167         F.20.2. Casts
168         F.20.3. Functions and Operators
169         F.20.4. Configuration Parameters
170         F.20.5. Examples
171         F.20.6. Bibliography
172         F.20.7. Author
173
174    F.21. lo — manage large objects
175
176         F.21.1. Rationale
177         F.21.2. How to Use It
178         F.21.3. Limitations
179         F.21.4. Author
180
181    F.22. ltree — hierarchical tree-like data type
182
183         F.22.1. Definitions
184         F.22.2. Operators and Functions
185         F.22.3. Indexes
186         F.22.4. Example
187         F.22.5. Transforms
188         F.22.6. Authors
189
190    F.23. pageinspect — low-level inspection of database pages
191
192         F.23.1. General Functions
193         F.23.2. Heap Functions
194         F.23.3. B-Tree Functions
195         F.23.4. BRIN Functions
196         F.23.5. GIN Functions
197         F.23.6. GiST Functions
198         F.23.7. Hash Functions
199
200    F.24. passwordcheck — verify password strength
201
202         F.24.1. Configuration Parameters
203
204    F.25. pg_buffercache — inspect PostgreSQL buffer cache state
205
206         F.25.1. The pg_buffercache View
207         F.25.2. The pg_buffercache_numa View
208         F.25.3. The pg_buffercache_summary() Function
209         F.25.4. The pg_buffercache_usage_counts() Function
210         F.25.5. The pg_buffercache_evict() Function
211         F.25.6. The pg_buffercache_evict_relation() Function
212         F.25.7. The pg_buffercache_evict_all() Function
213         F.25.8. Sample Output
214         F.25.9. Authors
215
216    F.26. pgcrypto — cryptographic functions
217
218         F.26.1. General Hashing Functions
219         F.26.2. Password Hashing Functions
220         F.26.3. PGP Encryption Functions
221         F.26.4. Raw Encryption Functions
222         F.26.5. Random-Data Functions
223         F.26.6. OpenSSL Support Functions
224         F.26.7. Configuration Parameters
225         F.26.8. Notes
226         F.26.9. Author
227
228    F.27. pg_freespacemap — examine the free space map
229
230         F.27.1. Functions
231         F.27.2. Sample Output
232         F.27.3. Author
233
234    F.28. pg_logicalinspect — logical decoding components inspection
235
236         F.28.1. Functions
237         F.28.2. Author
238
239    F.29. pg_overexplain — allow EXPLAIN to dump even more details
240
241         F.29.1. EXPLAIN (DEBUG)
242         F.29.2. EXPLAIN (RANGE_TABLE)
243         F.29.3. Author
244
245    F.30. pg_prewarm — preload relation data into buffer caches
246
247         F.30.1. Functions
248         F.30.2. Configuration Parameters
249         F.30.3. Author
250
251    F.31. pgrowlocks — show a table's row locking information
252
253         F.31.1. Overview
254         F.31.2. Sample Output
255         F.31.3. Author
256
257    F.32. pg_stat_statements — track statistics of SQL planning and
258           execution
259
260         F.32.1. The pg_stat_statements View
261         F.32.2. The pg_stat_statements_info View
262         F.32.3. Functions
263         F.32.4. Configuration Parameters
264         F.32.5. Sample Output
265         F.32.6. Authors
266
267    F.33. pgstattuple — obtain tuple-level statistics
268
269         F.33.1. Functions
270         F.33.2. Authors
271
272    F.34. pg_surgery — perform low-level surgery on relation data
273
274         F.34.1. Functions
275         F.34.2. Authors
276
277    F.35. pg_trgm — support for similarity of text using trigram matching
278
279         F.35.1. Trigram (or Trigraph) Concepts
280         F.35.2. Functions and Operators
281         F.35.3. GUC Parameters
282         F.35.4. Index Support
283         F.35.5. Text Search Integration
284         F.35.6. References
285         F.35.7. Authors
286
287    F.36. pg_visibility — visibility map information and utilities
288
289         F.36.1. Functions
290         F.36.2. Author
291
292    F.37. pg_walinspect — low-level WAL inspection
293
294         F.37.1. General Functions
295         F.37.2. Author
296
297    F.38. postgres_fdw — access data stored in external PostgreSQL servers
298
299         F.38.1. FDW Options of postgres_fdw
300         F.38.2. Functions
301         F.38.3. Connection Management
302         F.38.4. Transaction Management
303         F.38.5. Remote Query Optimization
304         F.38.6. Remote Query Execution Environment
305         F.38.7. Cross-Version Compatibility
306         F.38.8. Wait Events
307         F.38.9. Configuration Parameters
308         F.38.10. Examples
309         F.38.11. Author
310
311    F.39. seg — a datatype for line segments or floating point intervals
312
313         F.39.1. Rationale
314         F.39.2. Syntax
315         F.39.3. Precision
316         F.39.4. Usage
317         F.39.5. Notes
318         F.39.6. Credits
319
320    F.40. sepgsql — SELinux-, label-based mandatory access control (MAC)
321           security module
322
323         F.40.1. Overview
324         F.40.2. Installation
325         F.40.3. Regression Tests
326         F.40.4. GUC Parameters
327         F.40.5. Features
328         F.40.6. Sepgsql Functions
329         F.40.7. Limitations
330         F.40.8. External Resources
331         F.40.9. Author
332
333    F.41. spi — Server Programming Interface features/examples
334
335         F.41.1. refint — Functions for Implementing Referential Integrity
336         F.41.2. autoinc — Functions for Autoincrementing Fields
337         F.41.3. insert_username — Functions for Tracking Who Changed a
338                 Table
339
340         F.41.4. moddatetime — Functions for Tracking Last Modification
341                 Time
342
343    F.42. sslinfo — obtain client SSL information
344
345         F.42.1. Functions Provided
346         F.42.2. Author
347
348    F.43. tablefunc — functions that return tables (crosstab and others)
349
350         F.43.1. Functions Provided
351         F.43.2. Author
352
353    F.44. tcn — a trigger function to notify listeners of changes to table
354           content
355
356    F.45. test_decoding — SQL-based test/example module for WAL logical
357           decoding
358
359    F.46. tsm_system_rows — the SYSTEM_ROWS sampling method for TABLESAMPLE
360
361         F.46.1. Examples
362
363    F.47. tsm_system_time — the SYSTEM_TIME sampling method for TABLESAMPLE
364
365         F.47.1. Examples
366
367    F.48. unaccent — a text search dictionary which removes diacritics
368
369         F.48.1. Configuration
370         F.48.2. Usage
371         F.48.3. Functions
372
373    F.49. uuid-ossp — a UUID generator
374
375         F.49.1. uuid-ossp Functions
376         F.49.2. Building uuid-ossp
377         F.49.3. Author
378
379    F.50. xml2 — XPath querying and XSLT functionality
380
381         F.50.1. Deprecation Notice
382         F.50.2. Description of Functions
383         F.50.3. xpath_table
384         F.50.4. XSLT Functions
385         F.50.5. Author
386
387    This appendix and the next one contain information on the optional
388    components found in the contrib directory of the PostgreSQL
389    distribution. These include porting tools, analysis utilities, and
390    plug-in features that are not part of the core PostgreSQL system. They
391    are separate mainly because they address a limited audience or are too
392    experimental to be part of the main source tree. This does not preclude
393    their usefulness.
394
395    This appendix covers extensions and other server plug-in module
396    libraries found in contrib. Appendix G covers utility programs.
397
398    When building from the source distribution, these optional components
399    are not built automatically, unless you build the "world" target (see
400    Step 2). You can build and install all of them by running:
401 make
402 make install
403
404    in the contrib directory of a configured source tree; or to build and
405    install just one selected module, do the same in that module's
406    subdirectory. Many of the modules have regression tests, which can be
407    executed by running:
408 make check
409
410    before installation or
411 make installcheck
412
413    once you have a PostgreSQL server running.
414
415    If you are using a pre-packaged version of PostgreSQL, these components
416    are typically made available as a separate subpackage, such as
417    postgresql-contrib.
418
419    Many components supply new user-defined functions, operators, or types,
420    packaged as extensions. To make use of one of these extensions, after
421    you have installed the code you need to register the new SQL objects in
422    the database system. This is done by executing a CREATE EXTENSION
423    command. In a fresh database, you can simply do
424 CREATE EXTENSION extension_name;
425
426    This command registers the new SQL objects in the current database
427    only, so you need to run it in every database in which you want the
428    extension's facilities to be available. Alternatively, run it in
429    database template1 so that the extension will be copied into
430    subsequently-created databases by default.
431
432    For all extensions, the CREATE EXTENSION command must be run by a
433    database superuser, unless the extension is considered “trusted”.
434    Trusted extensions can be run by any user who has CREATE privilege on
435    the current database. Extensions that are trusted are identified as
436    such in the sections that follow. Generally, trusted extensions are
437    ones that cannot provide access to outside-the-database functionality.
438
439    The following extensions are trusted in a default installation:
440    btree_gin  fuzzystrmatch ltree     tcn
441    btree_gist hstore        pgcrypto  tsm_system_rows
442    citext     intarray      pg_trgm   tsm_system_time
443    cube       isn           seg       unaccent
444    dict_int   lo            tablefunc uuid-ossp
445
446    Many extensions allow you to install their objects in a schema of your
447    choice. To do that, add SCHEMA schema_name to the CREATE EXTENSION
448    command. By default, the objects will be placed in your current
449    creation target schema, which in turn defaults to public.
450
451    Note, however, that some of these components are not “extensions” in
452    this sense, but are loaded into the server in some other way, for
453    instance by way of shared_preload_libraries. See the documentation of
454    each component for details.