Skip to main content
Version: 2.0.0 (latest)

3.21. Languages

Languages are the basis for constructing functions and procedures in a database. This kind of object generates commands to register a new procedural language in a PostgreSQL database. You can create your own language with its proper syntax through the handler functions, but writing these functions is quite an advanced topic and demands the creation of C-coded functions, which are not covered by this document.

ch3.language-dialog.general1234

General
#FieldDescription
1Handler function

Defines the function that is called to execute the functions written in the procedural language. This function must have the signature: language_handler function().

2Validator function

Defines the function that is called when a new function is created in the language, to validate it. This function must have the signature: void function(oid).

3Inline function

Defines the function that is called to execute an anonymous code block (a DO command) in this language. This function must have the signature: void function(internal).

4Trusted language

Tells the server that the language does not grant access to data that the user would not otherwise have permission to handle.

References​

Language DDL
https://www.postgresql.org/docs/current/static/sql-createlanguage.html

Create custom languages
https://www.postgresql.org/docs/current/static/plhandler.html