| 1 |
<!-- doc/src/sgml/contrib.sgml --> |
| 2 |
|
| 3 |
<appendix id="contrib"> |
| 4 |
<title>Additional Supplied Modules and Extensions</title> |
| 5 |
|
| 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> |
| 18 |
|
| 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> |
| 25 |
|
| 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> |
| 50 |
|
| 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> |
| 56 |
|
| 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 |
| 65 |
|
| 66 |
<programlisting> |
| 67 |
CREATE EXTENSION <replaceable>extension_name</replaceable>; |
| 68 |
</programlisting> |
| 69 |
|
| 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> |
| 76 |
|
| 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> |
| 86 |
|
| 87 |
<para id="contrib-trusted-extensions"> |
| 88 |
The following extensions are trusted in a default installation: |
| 89 |
|
| 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> |
| 113 |
|
| 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> |
| 121 |
|
| 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> |
| 129 |
|
| 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 |
<ree; |
| 152 |
&pageinspect; |
| 153 |
&passwordcheck; |
| 154 |
&pgbuffercache; |
| 155 |
&pgcrypto; |
| 156 |
&pgfreespacemap; |
| 157 |
&pglogicalinspect; |
| 158 |
&pgoverexplain; |
| 159 |
&pgprewarm; |
| 160 |
&pgrowlocks; |
| 161 |
&pgstatstatements; |
| 162 |
&pgstattuple; |
| 163 |
&pgsurgery; |
| 164 |
&pgtrgm; |
| 165 |
&pgvisibility; |
| 166 |
&pgwalinspect; |
| 167 |
&postgres-fdw; |
| 168 |
&seg; |
| 169 |
&sepgsql; |
| 170 |
&contrib-spi; |
| 171 |
&sslinfo; |
| 172 |
&tablefunc; |
| 173 |
&tcn; |
| 174 |
&test-decoding; |
| 175 |
&tsm-system-rows; |
| 176 |
&tsm-system-time; |
| 177 |
&unaccent; |
| 178 |
&uuid-ossp; |
| 179 |
&xml2; |
| 180 |
|
| 181 |
</appendix> |
| 182 |
|
| 183 |
<!-- |
| 184 |
These are two separate appendixes because it is difficult to mix regular |
| 185 |
sections (for extensions) and refentries (for programs) in one chapter or |
| 186 |
appendix. And we do want the programs as refentries so that we can produce man |
| 187 |
pages. |
| 188 |
--> |
| 189 |
|
| 190 |
<appendix id="contrib-prog"> |
| 191 |
<title>Additional Supplied Programs</title> |
| 192 |
|
| 193 |
<para> |
| 194 |
This appendix and the previous one contain information regarding the modules that |
| 195 |
can be found in the <literal>contrib</literal> directory of the |
| 196 |
<productname>PostgreSQL</productname> distribution. See <xref linkend="contrib"/> for |
| 197 |
more information about the <literal>contrib</literal> section in general and |
| 198 |
server extensions and plug-ins found in <literal>contrib</literal> |
| 199 |
specifically. |
| 200 |
</para> |
| 201 |
|
| 202 |
<para> |
| 203 |
This appendix covers utility programs found in <literal>contrib</literal>. |
| 204 |
Once installed, either from source or a packaging system, they are found in |
| 205 |
the <filename>bin</filename> directory of the |
| 206 |
<productname>PostgreSQL</productname> installation and can be used like any |
| 207 |
other program. |
| 208 |
</para> |
| 209 |
|
| 210 |
<sect1 id="contrib-prog-client"> |
| 211 |
<title>Client Applications</title> |
| 212 |
|
| 213 |
<para> |
| 214 |
This section covers <productname>PostgreSQL</productname> client |
| 215 |
applications in <literal>contrib</literal>. They can be run from anywhere, |
| 216 |
independent of where the database server resides. See |
| 217 |
also <xref linkend="reference-client"/> for information about client |
| 218 |
applications that are part of the core <productname>PostgreSQL</productname> |
| 219 |
distribution. |
| 220 |
</para> |
| 221 |
|
| 222 |
&oid2name; |
| 223 |
&vacuumlo; |
| 224 |
</sect1> |
| 225 |
|
| 226 |
<sect1 id="contrib-prog-server"> |
| 227 |
<title>Server Applications</title> |
| 228 |
|
| 229 |
<para> |
| 230 |
Some applications run on the <productname>PostgreSQL</productname> server |
| 231 |
itself. Currently, no such applications are included in the |
| 232 |
<literal>contrib</literal> directory. See also <xref |
| 233 |
linkend="reference-server"/> for information about server applications that |
| 234 |
are part of the core <productname>PostgreSQL</productname> distribution. |
| 235 |
</para> |
| 236 |
|
| 237 |
</sect1> |
| 238 |
</appendix> |