Part V. Server Programming

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 LightDB has been understood. Later chapters in this part describe the server-side programming languages available in the LightDB 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 LightDB Type System
36.3. User-Defined Functions
36.4. User-Defined Procedures
36.5. Query Language (SQL) Functions
36.6. Function Overloading
36.7. Function Volatility Categories
36.8. Procedural Language Functions
36.9. Internal Functions
36.10. C-Language Functions
36.11. Function Optimization Information
36.12. User-Defined Aggregates
36.13. User-Defined Types
36.14. User-Defined Operators
36.15. Operator Optimization Information
36.16. Interfacing Extensions to Indexes
36.17. Packaging Related Objects into an Extension
36.18. 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. Event Triggers
38.1. Overview of Event Trigger Behavior
38.2. Event Trigger Firing Matrix
38.3. Writing Event Trigger Functions in C
38.4. A Complete Event Trigger Example
38.5. A Table Rewrite Event Trigger Example
39. The Rule System
39.1. The Query Tree
39.2. Views and the Rule System
39.3. Materialized Views
39.4. Rules on INSERT, UPDATE, and DELETE
39.5. Rules and Privileges
39.6. Rules and Command Status
39.7. Rules Versus Triggers
40. Procedural Languages
40.1. Installing Procedural Languages
41. PL/pgSQLSQL Procedural Language
41.1. Overview
41.2. Structure of PL/pgSQL
41.3. Declarations
41.4. Expressions
41.5. Basic Statements
41.6. Control Structures
41.7. Cursors
41.8. Transaction Management
41.9. Errors and Messages
41.10. Trigger Functions
41.11. PL/pgSQL under the Hood
41.12. Tips for Developing in PL/pgSQL
41.13. Porting from Oracle PL/SQL
42. PL/oraSQLSQL Procedural Language
42.1. Overview
42.2. Structure of PL/oraSQL
42.3. Declarations
42.4. Expressions
42.5. Basic Statements
42.6. Control Structures
42.7. Cursors
42.8. Collections
42.9. Transaction Management
42.10. Packages
42.11. Table function
42.12. Error Handling
43. Server Programming Interface
43.1. Interface Functions
43.2. Interface Support Functions
43.3. Memory Management
43.4. Transaction Management
43.5. Visibility of Data Changes
43.6. Examples
44. Background Worker Processes
45. Logical Decoding
45.1. Logical Decoding Examples
45.2. Logical Decoding Concepts
45.3. Streaming Replication Protocol Interface
45.4. Logical Decoding SQL Interface
45.5. System Catalogs Related to Logical Decoding
45.6. Logical Decoding Output Plugins
45.7. Logical Decoding Output Writers
45.8. Synchronous Replication Support for Logical Decoding
46. Replication Progress Tracking
English|中文