function is called by
<command>CREATE FUNCTION</command> if it exists. If a validator function
is provided by the language, declare it with a command like
<synopsis>
CREATE FUNCTION <replaceable>validator_function_name</replaceable>(oid)
RETURNS void
AS '<replaceable>path-to-shared-object</replaceable>'
LANGUAGE C STRICT;
</synopsis>
</para>
</step>
<step performance="required" id="xplang-install-cr5">
<para>
Finally, the PL must be declared with the command
<synopsis>
CREATE <optional>TRUSTED</optional> LANGUAGE <replaceable>language_name</replaceable>
HANDLER <replaceable>handler_function_name</replaceable>
<optional>INLINE <replaceable>inline_function_name</replaceable></optional>
<optional>VALIDATOR <replaceable>validator_function_name</replaceable></optional> ;
</synopsis>
The optional key word <literal>TRUSTED</literal> specifies that
the language does not grant access to data that the user would
not otherwise have. Trusted languages are designed for ordinary
database users (those without superuser privilege) and allows them
to safely create functions and
procedures. Since PL functions are executed inside the database
server, the <literal>TRUSTED</literal> flag should only be given
for languages that do not allow access to database server
internals or the file system. The languages
<application>PL/pgSQL</application>,
<application>PL/Tcl</application>, and
<application>PL/Perl</application>
are considered trusted; the languages
<application>PL/TclU</application>,
<application>PL/PerlU</application>, and
<application>PL/PythonU</application>
are designed to provide unlimited functionality and should
<emphasis>not</emphasis> be marked trusted.
</para>
</step>
</procedure>
<para>
<xref linkend="xplang-install-example"/> shows how the manual
installation procedure would work with the language
<application>PL/Perl</application>.
</para>
<example id="xplang-install-example">
<title>Manual Installation