OSDN Git Service

bac5044205bbf0c146da195e8b0f099bef8994d8
[pg-rex/syncrep.git] / doc / src / sgml / contrib.sgml
1 <!-- $PostgreSQL: pgsql/doc/src/sgml/contrib.sgml,v 1.9 2008/07/29 18:31:20 tgl Exp $ -->
2
3 <appendix id="contrib">
4  <title>Additional Supplied Modules</title>
5
6  <para>
7   This appendix contains information regarding the modules that
8   can be found in the <literal>contrib</literal> directory of the
9   <productname>PostgreSQL</> distribution.
10   These include porting tools, analysis utilities,
11   and plug-in features that are not part of the core PostgreSQL system,
12   mainly because they address a limited audience or are too experimental
13   to be part of the main source tree.  This does not preclude their
14   usefulness.
15  </para>
16
17  <para>
18   When building from the source distribution, these modules are not built
19   automatically.  You can build and install all of them by running
20 <screen>
21 <userinput>gmake</userinput>
22 <userinput>gmake install</userinput>
23 </screen>
24   in the <literal>contrib</literal> directory of a configured source tree;
25   or to build and install
26   just one selected module, do the same in that module's subdirectory.
27   Many of the modules have regression tests, which can be executed by
28   running
29 <screen>
30 <userinput>gmake installcheck</userinput>
31 </screen>
32   once you have a <productname>PostgreSQL</> server running.  (Note that
33   <literal>gmake check</> is not supported; you must have an operational
34   database server to perform these tests, and you must have built and
35   installed the module(s) to be tested.)
36  </para>
37
38  <para>
39   If you are using a pre-packaged version of <productname>PostgreSQL</>,
40   these modules are typically made available as a separate subpackage,
41   such as <literal>postgresql-contrib</>.
42  </para>
43
44  <para>
45   Many modules supply new user-defined functions, operators, or types.
46   To make use of one of these modules, after you have installed the code
47   you need to register the new objects in the database
48   system by running the SQL commands in the <literal>.sql</> file
49   supplied by the module.  For example,
50
51 <programlisting>
52 psql -d dbname -f <replaceable>SHAREDIR</>/contrib/<replaceable>module</>.sql
53 </programlisting>
54
55   Here, <replaceable>SHAREDIR</> means the installation's <quote>share</>
56   directory (<literal>pg_config --sharedir</> will tell you what this is).
57   In most cases the script must be run by a database superuser.
58  </para>
59
60  <para>
61   You need to run the <literal>.sql</> file in each database that you want
62   the module's facilities to be available in.  Alternatively, run it in
63   database <literal>template1</> so that the module will be copied into
64   subsequently-created databases by default.
65  </para>
66
67  <para>
68   You can modify the first command in the <literal>.sql</> file to determine
69   which schema within the database the module's objects will be created in.
70   By default, they will be placed in <literal>public</>.
71  </para>
72
73  <para>
74   After a major-version upgrade of <productname>PostgreSQL</>, run the
75   installation script again, even though the module's objects might have
76   been brought forward from the old installation by dump and restore.
77   This ensures that any new functions will be available and any needed
78   corrections will be applied.
79  </para>
80
81  &adminpack;
82  &btree-gist;
83  &chkpass;
84  &citext;
85  &cube;
86  &dblink;
87  &dict-int;
88  &dict-xsyn;
89  &earthdistance;
90  &fuzzystrmatch;
91  &hstore;
92  &intagg;
93  &intarray;
94  &isn;
95  &lo;
96  &ltree;
97  &oid2name;
98  &pageinspect;
99  &pgbench;
100  &pgbuffercache;
101  &pgcrypto;
102  &pgfreespacemap;
103  &pgrowlocks;
104  &pgstandby;
105  &pgstattuple;
106  &pgtrgm;
107  &seg;
108  &contrib-spi;
109  &sslinfo;
110  &tablefunc;
111  &test-parser;
112  &tsearch2;
113  &uuid-ossp;
114  &vacuumlo;
115  &xml2;
116
117 </appendix>