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 34 (covering functions) before diving into the material about server-side programming languages.

Table of Contents
34. Extending SQL
34.1. How Extensibility Works
34.2. The Postgres-XC Type System
34.3. User-defined Functions
34.4. Query Language (SQL) Functions
34.5. Function Overloading
34.6. Function Volatility Categories
34.7. Procedural Language Functions
34.8. Internal Functions
34.9. C-Language Functions
34.10. User-defined Aggregates
34.11. User-defined Types
34.12. User-defined Operators
34.13. Operator Optimization Information
34.14. Interfacing Extensions To Indexes
34.15. Packaging Related Objects into an Extension
34.16. Extension Building Infrastructure
35. Triggers
35.1. Overview of Trigger Behavior
35.2. Visibility of Data Changes
35.3. Writing Trigger Functions in C
35.4. A Complete Trigger Example
36. The Rule System
36.1. The Query Tree
36.2. Views and the Rule System
36.3. Rules on INSERT, UPDATE, and DELETE
36.4. Rules and Privileges
36.5. Rules and Command Status
36.6. Rules Versus Triggers
37. Procedural Languages
37.1. Installing Procedural Languages
38. PL/pgSQL - SQL Procedural Language
38.1. Overview
38.2. Structure of PL/pgSQL
38.3. Declarations
38.4. Expressions
38.5. Basic Statements
38.6. Control Structures
38.7. Cursors
38.8. Errors and Messages
38.9. Trigger Procedures
38.10. PL/pgSQL Under the Hood
38.11. Tips for Developing in PL/pgSQL
38.12. Porting from Oracle PL/SQL
39. PL/Tcl - Tcl Procedural Language
39.1. Overview
39.2. PL/Tcl Functions and Arguments
39.3. Data Values in PL/Tcl
39.4. Global Data in PL/Tcl
39.5. Database Access from PL/Tcl
39.6. Trigger Procedures in PL/Tcl
39.7. Modules and the unknown Command
39.8. Tcl Procedure Names
40. PL/Perl - Perl Procedural Language
40.1. PL/Perl Functions and Arguments
40.2. Data Values in PL/Perl
40.3. Built-in Functions
40.4. Global Values in PL/Perl
40.5. Trusted and Untrusted PL/Perl
40.6. PL/Perl Triggers
40.7. PL/Perl Under the Hood
41. PL/Python - Python Procedural Language
41.1. Python 2 vs. Python 3
41.2. PL/Python Functions
41.3. Data Values
41.4. Sharing Data
41.5. Anonymous Code Blocks
41.6. Trigger Functions
41.7. Database Access
41.8. Explicit Subtransactions
41.9. Utility Functions
41.10. Environment Variables
42. Server Programming Interface
42.1. Interface Functions
42.2. Interface Support Functions
42.3. Memory Management
42.4. Visibility of Data Changes
42.5. Examples