Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf1fb4b0

Browse files
committed
Fix obsolete references to old-style contrib installation methods.
1 parent2ee69ff commitf1fb4b0

11 files changed

+50
-42
lines changed

‎doc/src/sgml/contrib-spi.sgml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
1717
below) while creating a trigger.
1818
</para>
1919

20+
<para>
21+
Each of the groups of functions described below is provided as a
22+
separately-installable extension.
23+
</para>
24+
2025
<sect2>
21-
<title>refint.c &mdash; Functions for Implementing Referential Integrity</title>
26+
<title>refint &mdash; Functions for Implementing Referential Integrity</title>
2227

2328
<para>
2429
<function>check_primary_key()</> and
@@ -59,7 +64,7 @@
5964
</sect2>
6065

6166
<sect2>
62-
<title>timetravel.c &mdash; Functions for Implementing Time Travel</title>
67+
<title>timetravel &mdash; Functions for Implementing Time Travel</title>
6368

6469
<para>
6570
Long ago, <productname>PostgreSQL</> had a built-in time travel feature
@@ -152,7 +157,7 @@ CREATE TABLE mytab (
152157
</sect2>
153158

154159
<sect2>
155-
<title>autoinc.c &mdash; Functions for Autoincrementing Fields</title>
160+
<title>autoinc &mdash; Functions for Autoincrementing Fields</title>
156161

157162
<para>
158163
<function>autoinc()</> is a trigger that stores the next value of
@@ -179,7 +184,7 @@ CREATE TABLE mytab (
179184
</sect2>
180185

181186
<sect2>
182-
<title>insert_username.c &mdash; Functions for Tracking Who Changed a Table</title>
187+
<title>insert_username &mdash; Functions for Tracking Who Changed a Table</title>
183188

184189
<para>
185190
<function>insert_username()</> is a trigger that stores the current
@@ -200,7 +205,7 @@ CREATE TABLE mytab (
200205
</sect2>
201206

202207
<sect2>
203-
<title>moddatetime.c &mdash; Functions for Tracking Last Modification Time</title>
208+
<title>moddatetime &mdash; Functions for Tracking Last Modification Time</title>
204209

205210
<para>
206211
<function>moddatetime()</> is a trigger that stores the current

‎doc/src/sgml/contrib.sgml

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,38 +46,45 @@
4646
<para>
4747
Many modules supply new user-defined functions, operators, or types.
4848
To make use of one of these modules, after you have installed the code
49-
you need to register the new objects in the database
50-
system by running the SQL commands in the <literal>.sql</> file
51-
supplied by the module. For example,
49+
you need to register the new SQL objects in the database system.
50+
In <productname>PostgreSQL</> 9.1 and later, this is done by executing
51+
a <xref linkend="sql-createextension"> command. In a fresh database,
52+
you can simply do
5253

5354
<programlisting>
54-
psql -d dbname -f<replaceable>SHAREDIR</>/contrib/<replaceable>module</>.sql
55+
CREATE EXTENSION<replaceable>module_name</>;
5556
</programlisting>
5657

57-
Here, <replaceable>SHAREDIR</> means the installation's <quote>share</>
58-
directory (<literal>pg_config --sharedir</> will tell you what this is).
59-
In most cases the script must be run by a database superuser.
60-
</para>
61-
62-
<para>
63-
You need to run the <literal>.sql</> file in each database that you want
58+
This command must be run by a database superuser. This registers the
59+
new SQL objects in the current database only, so you need to run this
60+
command in each database that you want
6461
the module's facilities to be available in. Alternatively, run it in
65-
database <literal>template1</> so that themodule will be copied into
62+
database <literal>template1</> so that theextension will be copied into
6663
subsequently-created databases by default.
6764
</para>
6865

6966
<para>
70-
You can modify the first command in the <literal>.sql</> file to determine
71-
which schema within the database the module's objects will be created in.
72-
By default, they will be placed in <literal>public</>.
67+
Many modules allow you to install their objects in a schema of your
68+
choice. To do that, add <literal>SCHEMA
69+
<replaceable>schema_name</></literal> to the <command>CREATE EXTENSION</>
70+
command. By default, the objects will be placed in your current creation
71+
target schema, typically <literal>public</>.
7372
</para>
7473

7574
<para>
76-
After a major-version upgrade of <productname>PostgreSQL</>, run the
77-
installation script again, even though the module's objects might have
78-
been brought forward from the old installation by dump and restore.
79-
This ensures that any new functions will be available and any needed
80-
corrections will be applied.
75+
If your database was brought forward by dump and reload from a pre-9.1
76+
version of <productname>PostgreSQL</>, and you had been using the pre-9.1
77+
version of the module in it, you should instead do
78+
79+
<programlisting>
80+
CREATE EXTENSION <replaceable>module_name</> FROM unpackaged;
81+
</programlisting>
82+
83+
This will update the pre-9.1 objects of the module into a proper
84+
<firstterm>extension</> object. Future updates to the module will be
85+
managed by <xref linkend="sql-alterextension">.
86+
For more information about extension updates, see
87+
<xref linkend="extend-extensions">.
8188
</para>
8289

8390
&adminpack;

‎doc/src/sgml/dict-int.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
<title>Usage</title>
4848

4949
<para>
50-
Running theinstallation script creates a text search template
51-
<literal>intdict_template</> and a dictionary <literal>intdict</>
50+
Installing the<literal>dict_int</> extension creates a text search
51+
template<literal>intdict_template</> and a dictionary <literal>intdict</>
5252
based on it, with the default parameters. You can alter the
5353
parameters, for example
5454

‎doc/src/sgml/dict-xsyn.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ word syn1 syn2 syn3
8787
<title>Usage</title>
8888

8989
<para>
90-
Running theinstallation script creates a text search template
91-
<literal>xsyn_template</> and a dictionary <literal>xsyn</>
90+
Installing the<literal>dict_xsyn</> extension creates a text search
91+
template<literal>xsyn_template</> and a dictionary <literal>xsyn</>
9292
based on it, with default parameters. You can alter the
9393
parameters, for example
9494

‎doc/src/sgml/earthdistance.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<para>
1111
The <filename>earthdistance</> module provides two different approaches to
1212
calculating great circle distances on the surface of the Earth. The one
13-
described first depends on the <filename>cube</>package (which
13+
described first depends on the <filename>cube</>module (which
1414
<emphasis>must</> be installed before <filename>earthdistance</> can be
1515
installed). The second one is based on the built-in <type>point</> data type,
1616
using longitude and latitude for the coordinates.

‎doc/src/sgml/hstore.sgml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,12 +553,6 @@ SELECT key, count(*) FROM
553553
<sect2>
554554
<title>Compatibility</title>
555555

556-
<para>
557-
<emphasis>When upgrading from older versions, always load the new
558-
version of this module into the database before restoring a dump.
559-
Otherwise, many new features will be unavailable.</emphasis>
560-
</para>
561-
562556
<para>
563557
As of PostgreSQL 9.0, <type>hstore</> uses a different internal
564558
representation than previous versions. This presents no obstacle for

‎doc/src/sgml/pgstatstatements.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<para>
149149
This view, and the function <function>pg_stat_statements_reset</>,
150150
are available only in databases they have been specifically installed into
151-
byrunning the <filename>pg_stat_statements.sql</>install script.
151+
byinstalling the <literal>pg_stat_statements</>extension.
152152
However, statistics are tracked across all databases of the server
153153
whenever the <filename>pg_stat_statements</filename> module is loaded
154154
into the server, regardless of presence of the view.

‎doc/src/sgml/tablefunc.sgml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,9 @@ FROM crosstab3(
345345
<listitem>
346346
<para>
347347
Create a composite type describing the desired output columns,
348-
similar to the examples in the installation script. Then define a
348+
similar to the examples in
349+
<filename>contrib/tablefunc/tablefunc--1.0.sql</>.
350+
Then define a
349351
unique function name accepting one <type>text</> parameter and returning
350352
<type>setof your_type_name</>, but linking to the same underlying
351353
<function>crosstab</> C function. For example, if your source data

‎doc/src/sgml/test-parser.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ mydb=# SELECT * FROM ts_token_type('testparser');
3535
<title>Usage</title>
3636

3737
<para>
38-
Running theinstallation script creates a text search parser
39-
<literal>testparser</>. It has no user-configurable parameters.
38+
Installing the<literal>test_parser</> extension creates a text search
39+
parser<literal>testparser</>. It has no user-configurable parameters.
4040
</para>
4141

4242
<para>

‎doc/src/sgml/tsearch2.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
<emphasis>before</> loading the dump data! If your old installation
153153
had the <application>tsearch2</> objects in a schema other
154154
than <literal>public</>, be sure to adjust the
155-
<literal>tsearch2</literal> installation script so that the replacement
155+
<command>CREATE EXTENSION</> command so that the replacement
156156
objects are created in that same schema.
157157
</para>
158158
</step>

‎doc/src/sgml/unaccent.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<title>Usage</title>
7474

7575
<para>
76-
Running theinstallation script <filename>unaccent.sql</> creates a text
76+
Installing the<literal>unaccent</> extension creates a text
7777
search template <literal>unaccent</> and a dictionary <literal>unaccent</>
7878
based on it. The <literal>unaccent</> dictionary has the default
7979
parameter setting <literal>RULES='unaccent'</>, which makes it immediately

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp