|PostgreSQL Reference Manual - Volume 2 - Programming Guide|
by The PostgreSQL Global Development Group
Paperback (6"x9"), 408 pages
RRP £19.95 ($34.95)
Sales of this book support the PostgreSQL project! Get a printed copy>>>
8 Procedural Languages
PostgreSQL allows user-defined functions to be written in other languages besides SQL and C. These other languages are generically called procedural languages (PLs). For a function written in a procedural language, the database server has no built-in knowledge about how to interpret the function's source text. Instead, the task is passed to a special handler that knows the details of the language. The handler could either do all the work of parsing, syntax analysis, execution, etc. itself, or it could serve as “glue” between PostgreSQL and an existing implementation of a programming language. The handler itself is a C language function compiled into a shared object and loaded on demand, just like any other C function.
There are currently four procedural languages available in the standard PostgreSQL distribution: PL/pgSQL (section 9 PL/pgSQL - SQL Procedural Language), PL/Tcl (section 10 PL/Tcl - Tcl Procedural Language), PL/Perl (section 11 PL/Perl - Perl Procedural Language), and PL/Python (section 12 PL/Python - Python Procedural Language). There are additional procedural languages available that are not included in the core distribution. In addition other languages can be defined by users; the basics of developing a new procedural language are covered in Volume 4: Writing A Procedural Language Handler.
|ISBN 0954612035||PostgreSQL Reference Manual - Volume 2 - Programming Guide||See the print edition|