linkend="app-createlang"> can be used to do this from the shell
createlang plperl template1
The manual procedure described below is only recommended for
- installing custom languages that CREATE LANGUAGE
- does not know about.
+ installing languages that have not been packaged as extensions.
A procedural language is installed in a database in five steps,
- which must be carried out by a database superuser. (For languages
- known to CREATE LANGUAGE>, the second through fourth steps
- can be omitted, because they will be carried out automatically
- if needed.)
+ which must be carried out by a database superuser. In most cases
+ the required SQL commands should be packaged as the installation script
+ of an extension>, so that CREATE EXTENSION> can be
+ used to execute them.
CREATE FUNCTION validator_function_name(oid)
RETURNS void
AS 'path-to-shared-object'
- LANGUAGE C;
+ LANGUAGE C STRICT;
- The PL must be declared with the command
+ Finally, the PL must be declared with the command
CREATE TRUSTED PROCEDURAL LANGUAGE language-name
HANDLER handler_function_name
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 of functions and trigger
+ to safely create functions and trigger
procedures. Since PL functions are executed inside the database
server, the TRUSTED flag should only be given
for languages that do not allow access to database server
'$libdir/plperl' LANGUAGE C;
CREATE FUNCTION plperl_validator(oid) RETURNS void AS
- '$libdir/plperl' LANGUAGE C;
+ '$libdir/plperl' LANGUAGE C STRICT;