1 <!-- doc/src/sgml/contrib.sgml -->
3 <appendix id=
"contrib">
4 <title>Additional Supplied Modules and Extensions
</title>
7 This appendix and the next one contain information on the
9 found in the
<literal>contrib
</literal> directory of the
10 <productname>PostgreSQL
</productname> distribution.
11 These include porting tools, analysis utilities,
12 and plug-in features that are not part of the core PostgreSQL system.
13 They are separate mainly
14 because they address a limited audience or are too experimental
15 to be part of the main source tree. This does not preclude their
20 This appendix covers extensions and other server plug-in module
22 <literal>contrib
</literal>.
<xref linkend=
"contrib-prog"/> covers utility
27 When building from the source distribution, these optional
28 components are not built
29 automatically, unless you build the
"world" target
30 (see
<xref linkend=
"build"/>).
31 You can build and install all of them by running:
33 <userinput>make
</userinput>
34 <userinput>make install
</userinput>
36 in the
<literal>contrib
</literal> directory of a configured source tree;
37 or to build and install
38 just one selected module, do the same in that module's subdirectory.
39 Many of the modules have regression tests, which can be executed by
42 <userinput>make check
</userinput>
44 before installation or
46 <userinput>make installcheck
</userinput>
48 once you have a
<productname>PostgreSQL
</productname> server running.
52 If you are using a pre-packaged version of
<productname>PostgreSQL
</productname>,
53 these components are typically made available as a separate subpackage,
54 such as
<literal>postgresql-contrib
</literal>.
58 Many components supply new user-defined functions, operators, or types,
59 packaged as
<firstterm>extensions
</firstterm>.
60 To make use of one of these extensions, after you have installed the code
61 you need to register the new SQL objects in the database system.
62 This is done by executing
63 a
<xref linkend=
"sql-createextension"/> command. In a fresh database,
67 CREATE EXTENSION
<replaceable>extension_name
</replaceable>;
70 This command registers the new SQL objects in the current database only,
71 so you need to run it in every database in which you want
72 the extension's facilities to be available. Alternatively, run it in
73 database
<literal>template1
</literal> so that the extension will be copied into
74 subsequently-created databases by default.
78 For all extensions, the
<command>CREATE EXTENSION
</command> command must be
79 run by a database superuser, unless the extension is
80 considered
<quote>trusted
</quote>. Trusted extensions can be run by any
81 user who has
<literal>CREATE
</literal> privilege on the current
82 database. Extensions that are trusted are identified as such in the
83 sections that follow. Generally, trusted extensions are ones that cannot
84 provide access to outside-the-database functionality.
87 <para id=
"contrib-trusted-extensions">
88 The following extensions are trusted in a default installation:
90 <simplelist type=
"vert" columns=
"4">
91 <member><xref linkend=
"btree-gin"/></member>
92 <member><xref linkend=
"btree-gist"/></member>
93 <member><xref linkend=
"citext"/></member>
94 <member><xref linkend=
"cube"/></member>
95 <member><xref linkend=
"dict-int"/></member>
96 <member><xref linkend=
"fuzzystrmatch"/></member>
97 <member><xref linkend=
"hstore"/></member>
98 <member><xref linkend=
"intarray"/></member>
99 <member><xref linkend=
"isn"/></member>
100 <member><xref linkend=
"lo"/></member>
101 <member><xref linkend=
"ltree"/></member>
102 <member><xref linkend=
"pgcrypto"/></member>
103 <member><xref linkend=
"pgtrgm"/></member>
104 <member><xref linkend=
"seg"/></member>
105 <member><xref linkend=
"tablefunc"/></member>
106 <member><xref linkend=
"tcn"/></member>
107 <member><xref linkend=
"tsm-system-rows"/></member>
108 <member><xref linkend=
"tsm-system-time"/></member>
109 <member><xref linkend=
"unaccent"/></member>
110 <member><xref linkend=
"uuid-ossp"/></member>
115 Many extensions allow you to install their objects in a schema of your
116 choice. To do that, add
<literal>SCHEMA
117 <replaceable>schema_name
</replaceable></literal> to the
<command>CREATE EXTENSION
</command>
118 command. By default, the objects will be placed in your current creation
119 target schema, which in turn defaults to
<literal>public
</literal>.
123 Note, however, that some of these components are not
<quote>extensions
</quote>
124 in this sense, but are loaded into the server in some other way, for instance
126 <xref linkend=
"guc-shared-preload-libraries"/>. See the documentation of each
127 component for details.
133 &basebackup-to-shell;
183 These are two separate appendixes because it is difficult to mix regular
184 sections (for extensions) and refentries (for programs) in one chapter or
185 appendix. And we do want the programs as refentries so that we can produce man
189 <appendix id=
"contrib-prog">
190 <title>Additional Supplied Programs
</title>
193 This appendix and the previous one contain information regarding the modules that
194 can be found in the
<literal>contrib
</literal> directory of the
195 <productname>PostgreSQL
</productname> distribution. See
<xref linkend=
"contrib"/> for
196 more information about the
<literal>contrib
</literal> section in general and
197 server extensions and plug-ins found in
<literal>contrib
</literal>
202 This appendix covers utility programs found in
<literal>contrib
</literal>.
203 Once installed, either from source or a packaging system, they are found in
204 the
<filename>bin
</filename> directory of the
205 <productname>PostgreSQL
</productname> installation and can be used like any
209 <sect1 id=
"contrib-prog-client">
210 <title>Client Applications
</title>
213 This section covers
<productname>PostgreSQL
</productname> client
214 applications in
<literal>contrib
</literal>. They can be run from anywhere,
215 independent of where the database server resides. See
216 also
<xref linkend=
"reference-client"/> for information about client
217 applications that are part of the core
<productname>PostgreSQL
</productname>
225 <sect1 id=
"contrib-prog-server">
226 <title>Server Applications
</title>
229 Some applications run on the
<productname>PostgreSQL
</productname> server
230 itself. Currently, no such applications are included in the
231 <literal>contrib
</literal> directory. See also
<xref
232 linkend=
"reference-server"/> for information about server applications that
233 are part of the core
<productname>PostgreSQL
</productname> distribution.