]> begriffs open source - ai-pg/blob - full-docs/txt/xplang.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / xplang.txt
1
2 Chapter 40. Procedural Languages
3
4    Table of Contents
5
6    40.1. Installing Procedural Languages
7
8    PostgreSQL allows user-defined functions to be written in other
9    languages besides SQL and C. These other languages are generically
10    called procedural languages (PLs). For a function written in a
11    procedural language, the database server has no built-in knowledge
12    about how to interpret the function's source text. Instead, the task is
13    passed to a special handler that knows the details of the language. The
14    handler could either do all the work of parsing, syntax analysis,
15    execution, etc. itself, or it could serve as “glue” between PostgreSQL
16    and an existing implementation of a programming language. The handler
17    itself is a C language function compiled into a shared object and
18    loaded on demand, just like any other C function.
19
20    There are currently four procedural languages available in the standard
21    PostgreSQL distribution: PL/pgSQL (Chapter 41), PL/Tcl (Chapter 42),
22    PL/Perl (Chapter 43), and PL/Python (PL/Python). There are additional
23    procedural languages available that are not included in the core
24    distribution. Appendix H has information about finding them. In
25    addition other languages can be defined by users; the basics of
26    developing a new procedural language are covered in Chapter 57.