]> begriffs open source - ai-pg/blob - full-docs/txt/server-programming.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / server-programming.txt
1
2 Part V. Server Programming
3
4    This part is about extending the server functionality with user-defined
5    functions, data types, triggers, etc. These are advanced topics which
6    should be approached only after all the other user documentation about
7    PostgreSQL has been understood. Later chapters in this part describe
8    the server-side programming languages available in the PostgreSQL
9    distribution as well as general issues concerning server-side
10    programming. It is essential to read at least the earlier sections of
11    Chapter 36 (covering functions) before diving into the material about
12    server-side programming.
13
14    Table of Contents
15
16    36. Extending SQL
17
18         36.1. How Extensibility Works
19         36.2. The PostgreSQL Type System
20         36.3. User-Defined Functions
21         36.4. User-Defined Procedures
22         36.5. Query Language (SQL) Functions
23         36.6. Function Overloading
24         36.7. Function Volatility Categories
25         36.8. Procedural Language Functions
26         36.9. Internal Functions
27         36.10. C-Language Functions
28         36.11. Function Optimization Information
29         36.12. User-Defined Aggregates
30         36.13. User-Defined Types
31         36.14. User-Defined Operators
32         36.15. Operator Optimization Information
33         36.16. Interfacing Extensions to Indexes
34         36.17. Packaging Related Objects into an Extension
35         36.18. Extension Building Infrastructure
36
37    37. Triggers
38
39         37.1. Overview of Trigger Behavior
40         37.2. Visibility of Data Changes
41         37.3. Writing Trigger Functions in C
42         37.4. A Complete Trigger Example
43
44    38. Event Triggers
45
46         38.1. Overview of Event Trigger Behavior
47         38.2. Writing Event Trigger Functions in C
48         38.3. A Complete Event Trigger Example
49         38.4. A Table Rewrite Event Trigger Example
50         38.5. A Database Login Event Trigger Example
51
52    39. The Rule System
53
54         39.1. The Query Tree
55         39.2. Views and the Rule System
56         39.3. Materialized Views
57         39.4. Rules on INSERT, UPDATE, and DELETE
58         39.5. Rules and Privileges
59         39.6. Rules and Command Status
60         39.7. Rules Versus Triggers
61
62    40. Procedural Languages
63
64         40.1. Installing Procedural Languages
65
66    41. PL/pgSQL — SQL Procedural Language
67
68         41.1. Overview
69         41.2. Structure of PL/pgSQL
70         41.3. Declarations
71         41.4. Expressions
72         41.5. Basic Statements
73         41.6. Control Structures
74         41.7. Cursors
75         41.8. Transaction Management
76         41.9. Errors and Messages
77         41.10. Trigger Functions
78         41.11. PL/pgSQL under the Hood
79         41.12. Tips for Developing in PL/pgSQL
80         41.13. Porting from Oracle PL/SQL
81
82    42. PL/Tcl — Tcl Procedural Language
83
84         42.1. Overview
85         42.2. PL/Tcl Functions and Arguments
86         42.3. Data Values in PL/Tcl
87         42.4. Global Data in PL/Tcl
88         42.5. Database Access from PL/Tcl
89         42.6. Trigger Functions in PL/Tcl
90         42.7. Event Trigger Functions in PL/Tcl
91         42.8. Error Handling in PL/Tcl
92         42.9. Explicit Subtransactions in PL/Tcl
93         42.10. Transaction Management
94         42.11. PL/Tcl Configuration
95         42.12. Tcl Procedure Names
96
97    43. PL/Perl — Perl Procedural Language
98
99         43.1. PL/Perl Functions and Arguments
100         43.2. Data Values in PL/Perl
101         43.3. Built-in Functions
102         43.4. Global Values in PL/Perl
103         43.5. Trusted and Untrusted PL/Perl
104         43.6. PL/Perl Triggers
105         43.7. PL/Perl Event Triggers
106         43.8. PL/Perl Under the Hood
107
108    44. PL/Python — Python Procedural Language
109
110         44.1. PL/Python Functions
111         44.2. Data Values
112         44.3. Sharing Data
113         44.4. Anonymous Code Blocks
114         44.5. Trigger Functions
115         44.6. Database Access
116         44.7. Explicit Subtransactions
117         44.8. Transaction Management
118         44.9. Utility Functions
119         44.10. Python 2 vs. Python 3
120         44.11. Environment Variables
121
122    45. Server Programming Interface
123
124         45.1. Interface Functions
125         45.2. Interface Support Functions
126         45.3. Memory Management
127         45.4. Transaction Management
128         45.5. Visibility of Data Changes
129         45.6. Examples
130
131    46. Background Worker Processes
132    47. Logical Decoding
133
134         47.1. Logical Decoding Examples
135         47.2. Logical Decoding Concepts
136         47.3. Streaming Replication Protocol Interface
137         47.4. Logical Decoding SQL Interface
138         47.5. System Catalogs Related to Logical Decoding
139         47.6. Logical Decoding Output Plugins
140         47.7. Logical Decoding Output Writers
141         47.8. Synchronous Replication Support for Logical Decoding
142         47.9. Streaming of Large Transactions for Logical Decoding
143         47.10. Two-phase Commit Support for Logical Decoding
144
145    48. Replication Progress Tracking
146    49. Archive Modules
147
148         49.1. Initialization Functions
149         49.2. Archive Module Callbacks
150
151    50. OAuth Validator Modules
152
153         50.1. Safely Designing a Validator Module
154         50.2. Initialization Functions
155         50.3. OAuth Validator Callbacks