diff --git a/contrib/README b/contrib/README index 800c9344a6b..6601f02fe67 100644 --- a/contrib/README +++ b/contrib/README @@ -58,6 +58,10 @@ mSQL-interface - noupdate - trigger to prevent updates on single columns +plpgsql - + Postgres procedural language + by Jan Wieck + pginterface - A crude C/4GL by Bruce Momjian diff --git a/contrib/plpgsql/doc/plpgsql.txt b/contrib/plpgsql/doc/plpgsql.txt new file mode 100644 index 00000000000..d309955100f --- /dev/null +++ b/contrib/plpgsql/doc/plpgsql.txt @@ -0,0 +1,448 @@ + PL/pgSQL + A procedural language for the PostgreSQL RDBMS + + Jan Wieck + + + + Preface + + PL/pgSQL is a procedural language based on SQL designed for + the PostgreSQL database system. + + The extensibility features of PostgreSQL are mostly based on + the ability to define functions for various operations. + Functions could have been written in PostgreSQL's SQL dialect + or in the C programming language. Functions written in C are + compiled into a shared object and loaded by the database + backend process on demand. Also the trigger features of + PostgreSQL are based on functions but required the use of the + C language. + + Since version 6.3 PostgreSQL supports the definition of + procedural languages. In the case of a function or trigger + procedure defined in a procedural language, the database has + no builtin knowlege how to interpret the functions source + text. Instead, the function and trigger calls are passed into + a handler that knows the details of the language. The + handler itself is a function compiled into a shared object + and loaded on demand. + + + Overview + + The PL/pgSQL language is case insensitive. All keywords and + identifiers can be used in upper-/lowercase mixed. + + PL/pgSQL is a block oriented language. A block is defined as + + [<