54
54
55
55
<para>
56
56
For the languages supplied with the standard distribution, it is
57
- only necessary to execute <command>CREATE LANGUAGE </>
57
+ only necessary to execute <command>CREATE EXTENSION </>
58
58
<replaceable>language_name</> to install the language into the
59
59
current database. Alternatively, the program <xref
60
60
linkend="app-createlang"> can be used to do this from the shell
65
65
createlang plperl template1
66
66
</programlisting>
67
67
The manual procedure described below is only recommended for
68
- installing custom languages that <command>CREATE LANGUAGE</command>
69
- does not know about.
68
+ installing languages that have not been packaged as extensions.
70
69
</para>
71
70
72
71
<procedure>
@@ -76,10 +75,10 @@ createlang plperl template1
76
75
77
76
<para>
78
77
A procedural language is installed in a database in five steps,
79
- which must be carried out by a database superuser. (For languages
80
- known to <command>CREATE LANGUAGE</>, the second through fourth steps
81
- can be omitted, because they will be carried out automatically
82
- if needed.)
78
+ which must be carried out by a database superuser. In most cases
79
+ the required SQL commands should be packaged as the installation script
80
+ of an <quote>extension</>, so that <command>CREATE EXTENSION</> can be
81
+ used to execute them.
83
82
</para>
84
83
85
84
<step performance="required" id="xplang-install-cr1">
@@ -136,14 +135,14 @@ CREATE FUNCTION <replaceable>inline_function_name</replaceable>(internal)
136
135
CREATE FUNCTION <replaceable>validator_function_name</replaceable>(oid)
137
136
RETURNS void
138
137
AS '<replaceable>path-to-shared-object</replaceable>'
139
- LANGUAGE C;
138
+ LANGUAGE C STRICT ;
140
139
</synopsis>
141
140
</para>
142
141
</step>
143
142
144
143
<step performance="required" id="xplang-install-cr5">
145
144
<para>
146
- The PL must be declared with the command
145
+ Finally, the PL must be declared with the command
147
146
<synopsis>
148
147
CREATE <optional>TRUSTED</optional> <optional>PROCEDURAL</optional> LANGUAGE <replaceable>language-name</replaceable>
149
148
HANDLER <replaceable>handler_function_name</replaceable>
@@ -154,7 +153,7 @@ CREATE <optional>TRUSTED</optional> <optional>PROCEDURAL</optional> LANGUAGE <re
154
153
the language does not grant access to data that the user would
155
154
not otherwise have. Trusted languages are designed for ordinary
156
155
database users (those without superuser privilege) and allows them
157
- to safely create of functions and trigger
156
+ to safely create functions and trigger
158
157
procedures. Since PL functions are executed inside the database
159
158
server, the <literal>TRUSTED</literal> flag should only be given
160
159
for languages that do not allow access to database server
@@ -201,7 +200,7 @@ CREATE FUNCTION plperl_inline_handler(internal) RETURNS void AS
201
200
'$libdir/plperl' LANGUAGE C;
202
201
203
202
CREATE FUNCTION plperl_validator(oid) RETURNS void AS
204
- '$libdir/plperl' LANGUAGE C;
203
+ '$libdir/plperl' LANGUAGE C STRICT ;
205
204
</programlisting>
206
205
</para>
207
206
0 commit comments