Remove old RULE privilege completely.
[pgsql.git] / doc / src / sgml / contrib.sgml
blob44639a8dcab901cc68a624f6f2c36f1a6a946dd0
1 <!-- doc/src/sgml/contrib.sgml -->
3 <appendix id="contrib">
4 <title>Additional Supplied Modules and Extensions</title>
6 <para>
7 This appendix and the next one contain information on the
8 optional components
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
16 usefulness.
17 </para>
19 <para>
20 This appendix covers extensions and other server plug-in module
21 libraries found in
22 <literal>contrib</literal>. <xref linkend="contrib-prog"/> covers utility
23 programs.
24 </para>
26 <para>
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:
32 <screen>
33 <userinput>make</userinput>
34 <userinput>make install</userinput>
35 </screen>
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
40 running:
41 <screen>
42 <userinput>make check</userinput>
43 </screen>
44 before installation or
45 <screen>
46 <userinput>make installcheck</userinput>
47 </screen>
48 once you have a <productname>PostgreSQL</productname> server running.
49 </para>
51 <para>
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>.
55 </para>
57 <para>
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,
64 you can simply do
66 <programlisting>
67 CREATE EXTENSION <replaceable>extension_name</replaceable>;
68 </programlisting>
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.
75 </para>
77 <para>
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.
85 </para>
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>
111 </simplelist>
112 </para>
114 <para>
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>.
120 </para>
122 <para>
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
125 by way of
126 <xref linkend="guc-shared-preload-libraries"/>. See the documentation of each
127 component for details.
128 </para>
130 &amcheck;
131 &auth-delay;
132 &auto-explain;
133 &basebackup-to-shell;
134 &basic-archive;
135 &bloom;
136 &btree-gin;
137 &btree-gist;
138 &citext;
139 &cube;
140 &dblink;
141 &dict-int;
142 &dict-xsyn;
143 &earthdistance;
144 &file-fdw;
145 &fuzzystrmatch;
146 &hstore;
147 &intagg;
148 &intarray;
149 &isn;
150 &lo;
151 &ltree;
152 &pageinspect;
153 &passwordcheck;
154 &pgbuffercache;
155 &pgcrypto;
156 &pgfreespacemap;
157 &pgprewarm;
158 &pgrowlocks;
159 &pgstatstatements;
160 &pgstattuple;
161 &pgsurgery;
162 &pgtrgm;
163 &pgvisibility;
164 &pgwalinspect;
165 &postgres-fdw;
166 &seg;
167 &sepgsql;
168 &contrib-spi;
169 &sslinfo;
170 &tablefunc;
171 &tcn;
172 &test-decoding;
173 &tsm-system-rows;
174 &tsm-system-time;
175 &unaccent;
176 &uuid-ossp;
177 &xml2;
179 </appendix>
181 <!--
182 These are two separate appendixes because it is difficult to mix regular
183 sections (for extensions) and refentries (for programs) in one chapter or
184 appendix. And we do want the programs as refentries so that we can produce man
185 pages.
188 <appendix id="contrib-prog">
189 <title>Additional Supplied Programs</title>
191 <para>
192 This appendix and the previous one contain information regarding the modules that
193 can be found in the <literal>contrib</literal> directory of the
194 <productname>PostgreSQL</productname> distribution. See <xref linkend="contrib"/> for
195 more information about the <literal>contrib</literal> section in general and
196 server extensions and plug-ins found in <literal>contrib</literal>
197 specifically.
198 </para>
200 <para>
201 This appendix covers utility programs found in <literal>contrib</literal>.
202 Once installed, either from source or a packaging system, they are found in
203 the <filename>bin</filename> directory of the
204 <productname>PostgreSQL</productname> installation and can be used like any
205 other program.
206 </para>
208 <sect1 id="contrib-prog-client">
209 <title>Client Applications</title>
211 <para>
212 This section covers <productname>PostgreSQL</productname> client
213 applications in <literal>contrib</literal>. They can be run from anywhere,
214 independent of where the database server resides. See
215 also <xref linkend="reference-client"/> for information about client
216 applications that are part of the core <productname>PostgreSQL</productname>
217 distribution.
218 </para>
220 &oid2name;
221 &vacuumlo;
222 </sect1>
224 <sect1 id="contrib-prog-server">
225 <title>Server Applications</title>
227 <para>
228 Some applications run on the <productname>PostgreSQL</productname> server
229 itself. Currently, no such applications are included in the
230 <literal>contrib</literal> directory. See also <xref
231 linkend="reference-server"/> for information about server applications that
232 are part of the core <productname>PostgreSQL</productname> distribution.
233 </para>
235 </sect1>
236 </appendix>