Chapter 35. Extending SQL
Table of Contents
- 35.1. How Extensibility Works- 35.2. The Postgres Pro Type System
- 35.3. User-Defined Functions- 35.4. User-Defined Procedures
- 35.5. Query Language (SQL) Functions
- 35.4. User-Defined Procedures
- 35.5.1. Arguments for SQL Functions- 35.5.2. SQL Functions on Base Types
- 35.5.3. SQL Functions on Composite Types
- 35.5.4. SQL Functions with Output Parameters
- 35.5.5. SQL Functions with Variable Numbers of Arguments
- 35.5.6. SQL Functions with Default Values for Arguments
- 35.5.7. SQL Functions as Table Sources
- 35.5.8. SQL Functions Returning Sets
- 35.5.9. SQL Functions Returning
TABLE
- 35.5.10. Polymorphic SQL Functions
- 35.5.11. SQL Functions with Collations
- 35.5.2. SQL Functions on Base Types
 
- 35.5.1. Arguments for SQL Functions
- 35.6. Function Overloading- 35.7. Function Volatility Categories
- 35.8. Procedural Language Functions
- 35.9. Internal Functions
- 35.10. C-Language Functions
- 35.7. Function Volatility Categories
- 35.10.1. Dynamic Loading- 35.10.2. Base Types in C-Language Functions
- 35.10.3. Version 1 Calling Conventions
- 35.10.4. Writing Code
- 35.10.5. Compiling and Linking Dynamically-Loaded Functions
- 35.10.6. Composite-Type Arguments
- 35.10.7. Returning Rows (Composite Types)
- 35.10.8. Returning Sets
- 35.10.9. Polymorphic Arguments and Return Types
- 35.10.10. Shared Memory and LWLocks
- 35.10.11. Using C++ for Extensibility
- 35.10.2. Base Types in C-Language Functions
 
- 35.10.1. Dynamic Loading
- 35.11. Function Optimization Information- 35.12. User-Defined Aggregates
- 35.13. User-Defined Types- 35.14. User-Defined Operators
- 35.15. Operator Optimization Information
- 35.14. User-Defined Operators
- 35.16. Interfacing Extensions to Indexes
- 35.17. Packaging Related Objects into an Extension
- 35.18. Extension Building Infrastructure
In the sections that follow, we will discuss how you can extend the Postgres Pro SQL query language by adding:
- functions (starting in Section 35.3) 
- aggregates (starting in Section 35.12) 
- data types (starting in Section 35.13) 
- operators (starting in Section 35.14) 
- operator classes for indexes (starting in Section 35.16) 
- packages of related objects (starting in Section 35.17)