2010-09-20 22:08:53 +02:00
|
|
|
<!-- doc/src/sgml/contrib.sgml -->
|
2007-11-14 03:36:43 +01:00
|
|
|
|
|
|
|
<appendix id="contrib">
|
|
|
|
<title>Additional Supplied Modules</title>
|
2007-11-11 00:30:46 +01:00
|
|
|
|
|
|
|
<para>
|
2007-11-14 03:36:43 +01:00
|
|
|
This appendix contains information regarding the modules that
|
2007-11-11 00:30:46 +01:00
|
|
|
can be found in the <literal>contrib</literal> directory of the
|
2007-11-14 03:36:43 +01:00
|
|
|
<productname>PostgreSQL</> distribution.
|
|
|
|
These include porting tools, analysis utilities,
|
2007-11-11 00:30:46 +01:00
|
|
|
and plug-in features that are not part of the core PostgreSQL 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.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2007-11-14 03:36:43 +01:00
|
|
|
When building from the source distribution, these modules are not built
|
2010-11-23 21:27:50 +01:00
|
|
|
automatically, unless you build the "world" target
|
2010-01-29 00:59:52 +01:00
|
|
|
(see <xref linkend="build">).
|
|
|
|
You can build and install all of them by running:
|
2007-11-14 03:36:43 +01:00
|
|
|
<screen>
|
|
|
|
<userinput>gmake</userinput>
|
|
|
|
<userinput>gmake install</userinput>
|
|
|
|
</screen>
|
|
|
|
in the <literal>contrib</literal> directory of a configured source tree;
|
|
|
|
or to build and install
|
|
|
|
just one selected module, do the same in that module's subdirectory.
|
|
|
|
Many of the modules have regression tests, which can be executed by
|
2009-04-27 18:27:36 +02:00
|
|
|
running:
|
2007-11-14 03:36:43 +01:00
|
|
|
<screen>
|
|
|
|
<userinput>gmake installcheck</userinput>
|
|
|
|
</screen>
|
|
|
|
once you have a <productname>PostgreSQL</> server running. (Note that
|
|
|
|
<literal>gmake check</> is not supported; you must have an operational
|
|
|
|
database server to perform these tests, and you must have built and
|
|
|
|
installed the module(s) to be tested.)
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If you are using a pre-packaged version of <productname>PostgreSQL</>,
|
|
|
|
these modules are typically made available as a separate subpackage,
|
|
|
|
such as <literal>postgresql-contrib</>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Many modules supply new user-defined functions, operators, or types.
|
|
|
|
To make use of one of these modules, after you have installed the code
|
2011-02-14 07:10:44 +01:00
|
|
|
you need to register the new SQL objects in the database system.
|
|
|
|
In <productname>PostgreSQL</> 9.1 and later, this is done by executing
|
|
|
|
a <xref linkend="sql-createextension"> command. In a fresh database,
|
|
|
|
you can simply do
|
2007-11-14 03:36:43 +01:00
|
|
|
|
|
|
|
<programlisting>
|
2011-02-14 07:10:44 +01:00
|
|
|
CREATE EXTENSION <replaceable>module_name</>;
|
2007-11-14 03:36:43 +01:00
|
|
|
</programlisting>
|
|
|
|
|
2011-02-14 07:10:44 +01:00
|
|
|
This command must be run by a database superuser. This registers the
|
|
|
|
new SQL objects in the current database only, so you need to run this
|
|
|
|
command in each database that you want
|
2007-11-14 03:36:43 +01:00
|
|
|
the module's facilities to be available in. Alternatively, run it in
|
2011-02-14 07:10:44 +01:00
|
|
|
database <literal>template1</> so that the extension will be copied into
|
2007-11-14 03:36:43 +01:00
|
|
|
subsequently-created databases by default.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2011-02-14 07:10:44 +01:00
|
|
|
Many modules allow you to install their objects in a schema of your
|
|
|
|
choice. To do that, add <literal>SCHEMA
|
|
|
|
<replaceable>schema_name</></literal> to the <command>CREATE EXTENSION</>
|
|
|
|
command. By default, the objects will be placed in your current creation
|
|
|
|
target schema, typically <literal>public</>.
|
2007-11-14 03:36:43 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2011-02-14 07:10:44 +01:00
|
|
|
If your database was brought forward by dump and reload from a pre-9.1
|
|
|
|
version of <productname>PostgreSQL</>, and you had been using the pre-9.1
|
|
|
|
version of the module in it, you should instead do
|
|
|
|
|
|
|
|
<programlisting>
|
|
|
|
CREATE EXTENSION <replaceable>module_name</> FROM unpackaged;
|
|
|
|
</programlisting>
|
|
|
|
|
|
|
|
This will update the pre-9.1 objects of the module into a proper
|
|
|
|
<firstterm>extension</> object. Future updates to the module will be
|
|
|
|
managed by <xref linkend="sql-alterextension">.
|
|
|
|
For more information about extension updates, see
|
|
|
|
<xref linkend="extend-extensions">.
|
2007-11-11 00:30:46 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
&adminpack;
|
2010-11-27 13:22:25 +01:00
|
|
|
&auth-delay;
|
2008-11-19 03:59:28 +01:00
|
|
|
&auto-explain;
|
2009-03-26 00:20:01 +01:00
|
|
|
&btree-gin;
|
2007-11-11 00:30:46 +01:00
|
|
|
&btree-gist;
|
|
|
|
&chkpass;
|
2008-07-29 20:31:20 +02:00
|
|
|
&citext;
|
2007-11-11 00:30:46 +01:00
|
|
|
&cube;
|
|
|
|
&dblink;
|
2007-12-02 22:13:34 +01:00
|
|
|
&dict-int;
|
|
|
|
&dict-xsyn;
|
2010-11-18 02:46:19 +01:00
|
|
|
&dummy-seclabel;
|
2007-11-11 00:30:46 +01:00
|
|
|
&earthdistance;
|
2011-02-20 20:06:59 +01:00
|
|
|
&file-fdw;
|
2007-11-11 00:30:46 +01:00
|
|
|
&fuzzystrmatch;
|
|
|
|
&hstore;
|
|
|
|
&intagg;
|
|
|
|
&intarray;
|
|
|
|
&isn;
|
|
|
|
&lo;
|
|
|
|
<ree;
|
|
|
|
&oid2name;
|
|
|
|
&pageinspect;
|
2009-11-18 22:57:56 +01:00
|
|
|
&passwordcheck;
|
2010-06-14 19:25:24 +02:00
|
|
|
&pgarchivecleanup;
|
2007-11-11 00:30:46 +01:00
|
|
|
&pgbench;
|
2007-12-02 23:33:20 +01:00
|
|
|
&pgbuffercache;
|
2007-11-11 00:30:46 +01:00
|
|
|
&pgcrypto;
|
2007-12-02 23:33:20 +01:00
|
|
|
&pgfreespacemap;
|
2007-11-11 00:30:46 +01:00
|
|
|
&pgrowlocks;
|
2007-12-02 23:33:20 +01:00
|
|
|
&pgstandby;
|
2009-01-04 23:19:59 +01:00
|
|
|
&pgstatstatements;
|
2007-11-11 00:30:46 +01:00
|
|
|
&pgstattuple;
|
2011-01-21 18:47:54 +01:00
|
|
|
&pgtestfsync;
|
2007-12-02 23:33:20 +01:00
|
|
|
&pgtrgm;
|
2010-05-12 04:19:11 +02:00
|
|
|
&pgupgrade;
|
2007-11-11 00:30:46 +01:00
|
|
|
&seg;
|
2011-01-24 02:44:48 +01:00
|
|
|
&sepgsql;
|
2007-12-03 05:18:47 +01:00
|
|
|
&contrib-spi;
|
2007-11-11 00:30:46 +01:00
|
|
|
&sslinfo;
|
|
|
|
&tablefunc;
|
2007-12-03 05:18:47 +01:00
|
|
|
&test-parser;
|
2007-11-14 02:09:50 +01:00
|
|
|
&tsearch2;
|
2009-08-18 12:34:39 +02:00
|
|
|
&unaccent;
|
2007-11-11 00:30:46 +01:00
|
|
|
&uuid-ossp;
|
|
|
|
&vacuumlo;
|
|
|
|
&xml2;
|
|
|
|
|
2007-11-14 03:36:43 +01:00
|
|
|
</appendix>
|