2 Chapter 36. Extending SQL
6 36.1. How Extensibility Works
7 36.2. The PostgreSQL Type System
10 36.2.2. Container Types
13 36.2.5. Polymorphic Types
15 36.3. User-Defined Functions
16 36.4. User-Defined Procedures
17 36.5. Query Language (SQL) Functions
19 36.5.1. Arguments for SQL Functions
20 36.5.2. SQL Functions on Base Types
21 36.5.3. SQL Functions on Composite Types
22 36.5.4. SQL Functions with Output Parameters
23 36.5.5. SQL Procedures with Output Parameters
24 36.5.6. SQL Functions with Variable Numbers of Arguments
25 36.5.7. SQL Functions with Default Values for Arguments
26 36.5.8. SQL Functions as Table Sources
27 36.5.9. SQL Functions Returning Sets
28 36.5.10. SQL Functions Returning TABLE
29 36.5.11. Polymorphic SQL Functions
30 36.5.12. SQL Functions with Collations
32 36.6. Function Overloading
33 36.7. Function Volatility Categories
34 36.8. Procedural Language Functions
35 36.9. Internal Functions
36 36.10. C-Language Functions
38 36.10.1. Dynamic Loading
39 36.10.2. Base Types in C-Language Functions
40 36.10.3. Version 1 Calling Conventions
42 36.10.5. Compiling and Linking Dynamically-Loaded Functions
43 36.10.6. Server API and ABI Stability Guidance
44 36.10.7. Composite-Type Arguments
45 36.10.8. Returning Rows (Composite Types)
46 36.10.9. Returning Sets
47 36.10.10. Polymorphic Arguments and Return Types
48 36.10.11. Shared Memory
50 36.10.13. Custom Wait Events
51 36.10.14. Injection Points
52 36.10.15. Custom Cumulative Statistics
53 36.10.16. Using C++ for Extensibility
55 36.11. Function Optimization Information
56 36.12. User-Defined Aggregates
58 36.12.1. Moving-Aggregate Mode
59 36.12.2. Polymorphic and Variadic Aggregates
60 36.12.3. Ordered-Set Aggregates
61 36.12.4. Partial Aggregation
62 36.12.5. Support Functions for Aggregates
64 36.13. User-Defined Types
66 36.13.1. TOAST Considerations
68 36.14. User-Defined Operators
69 36.15. Operator Optimization Information
78 36.16. Interfacing Extensions to Indexes
80 36.16.1. Index Methods and Operator Classes
81 36.16.2. Index Method Strategies
82 36.16.3. Index Method Support Routines
84 36.16.5. Operator Classes and Operator Families
85 36.16.6. System Dependencies on Operator Classes
86 36.16.7. Ordering Operators
87 36.16.8. Special Features of Operator Classes
89 36.17. Packaging Related Objects into an Extension
91 36.17.1. Extension Files
92 36.17.2. Extension Relocatability
93 36.17.3. Extension Configuration Tables
94 36.17.4. Extension Updates
95 36.17.5. Installing Extensions Using Update Scripts
96 36.17.6. Security Considerations for Extensions
97 36.17.7. Extension Example
99 36.18. Extension Building Infrastructure
101 In the sections that follow, we will discuss how you can extend the
102 PostgreSQL SQL query language by adding:
103 * functions (starting in Section 36.3)
104 * aggregates (starting in Section 36.12)
105 * data types (starting in Section 36.13)
106 * operators (starting in Section 36.14)
107 * operator classes for indexes (starting in Section 36.16)
108 * packages of related objects (starting in Section 36.17)