Create Language
Defines a new language to be used by functions.
Synopsis
CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE 'langname' HANDLER call_handler LANCOMPILER 'comment'
Parameters
TRUSTEDThe
TRUSTEDkeyword indicates that the PostgreSQL lets unprivileged users bypass user and permission-related access restrictions on the language. If this parameter is not specified during creation of the language, only database superusers will be able to use the language to create new functions.PROCEDURALThe optional
PROCEDURALnoise term. This may be used to increase readability of yourCREATE LANGUAGEstatements, but has no effect.langnameThe name of the new procedural language to define. This name is case insensitive. A procedural language will not (and cannot) override an existing, builtin PostgreSQL language.
HANDLERcall_handlerThe name of the already-defined function that will be called to execute the PL procedures.
commentA string that is inserted into the
lancompilercolumn of thepg_languagesystem table. TheLANCOMPILERclause is a legacy clause with no practical effect, and may be removed in a future PostgreSQL release. However, as of version 7.1.x, this is still a required clause.
Results
CREATEThe message returned when a new language is successfully created.
ERROR: PL handler functioncall_handler( )doesn't existThe error returned if the function you specified as the call handler with
call_handlerparameter cannot be found.
Description
Use the CREATE LANGUAGE command to load a new procedural ...