V. Server Programming

Note: At present, this section is just taken from PostgreSQL documentation and is subject to revision for Postgres-XC.

This part is about extending the server functionality with user-defined functions, data types, triggers, etc. These are advanced topics which should probably be approached only after all the other user documentation about PostgreSQL has been understood. Later chapters in this part describe the server-side programming languages available in the PostgreSQL distribution as well as general issues concerning server-side programming languages. It is essential to read at least the earlier sections of Chapter 36 (covering functions) before diving into the material about server-side programming languages.

Table of Contents
36. Extending SQL
36.1. How Extensibility Works
36.2. The Postgres-XC Type System
36.3. User-defined Functions
36.4. Query Language (SQL) Functions
36.5. Function Overloading
36.6. Function Volatility Categories
36.7. Procedural Language Functions
36.8. Internal Functions
36.9. C-Language Functions
36.10. User-defined Aggregates
36.11. User-defined Types
36.12. User-defined Operators
36.13. Operator Optimization Information
36.14. Interfacing Extensions To Indexes
36.15. Packaging Related Objects into an Extension
36.16. Extension Building Infrastructure
37. Triggers
37.1. Overview of Trigger Behavior
37.2. Visibility of Data Changes
37.3. Writing Trigger Functions in C
37.4. A Complete Trigger Example
38. The Rule System
38.1. The Query Tree
38.2. Views and the Rule System
38.3. Rules on INSERT, UPDATE, and DELETE
38.4. Rules and Privileges
38.5. Rules and Command Status
38.6. Rules Versus Triggers
39. Procedural Languages
39.1. Installing Procedural Languages
40. PL/pgSQL - SQL Procedural Language
40.1. Overview
40.2. Structure of PL/pgSQL
40.3. Declarations
40.4. Expressions
40.5. Basic Statements
40.6. Control Structures
40.7. Cursors
40.8. Errors and Messages
40.9. Trigger Procedures
40.10. PL/pgSQL Under the Hood
40.11. Tips for Developing in PL/pgSQL
40.12. Porting from Oracle PL/SQL
41. PL/Tcl - Tcl Procedural Language
41.1. Overview
41.2. PL/Tcl Functions and Arguments
41.3. Data Values in PL/Tcl
41.4. Global Data in PL/Tcl
41.5. Database Access from PL/Tcl
41.6. Trigger Procedures in PL/Tcl
41.7. Modules and the unknown Command
41.8. Tcl Procedure Names
42. PL/Perl - Perl Procedural Language
42.1. PL/Perl Functions and Arguments
42.2. Data Values in PL/Perl
42.3. Built-in Functions
42.4. Global Values in PL/Perl
42.5. Trusted and Untrusted PL/Perl
42.6. PL/Perl Triggers
42.7. PL/Perl Under the Hood
43. PL/Python - Python Procedural Language
43.1. Python 2 vs. Python 3
43.2. PL/Python Functions
43.3. Data Values
43.4. Sharing Data
43.5. Anonymous Code Blocks
43.6. Trigger Functions
43.7. Database Access
43.8. Explicit Subtransactions
43.9. Utility Functions
43.10. Environment Variables
44. Server Programming Interface
44.1. Interface Functions
44.2. Interface Support Functions
44.3. Memory Management
44.4. Visibility of Data Changes
44.5. Examples