Chapter 37. Extending SQL
Table of Contents
- 37.1. How Extensibility Works- 37.2. The Postgres Pro Type System
- 37.3. User-defined Functions- 37.4. Query Language (SQL) Functions
- 37.4.1. Arguments for SQL Functions- 37.4.2. SQL Functions on Base Types
- 37.4.3. SQL Functions on Composite Types
- 37.4.4. SQL Functions with Output Parameters
- 37.4.5. SQL Functions with Variable Numbers of Arguments
- 37.4.6. SQL Functions with Default Values for Arguments
- 37.4.7. SQL Functions as Table Sources
- 37.4.8. SQL Functions Returning Sets
- 37.4.9. SQL Functions Returning
TABLE
- 37.4.10. Polymorphic SQL Functions
- 37.4.11. SQL Functions with Collations
- 37.4.2. SQL Functions on Base Types
 
- 37.4.1. Arguments for SQL Functions
- 37.5. Function Overloading- 37.6. Function Volatility Categories
- 37.7. Procedural Language Functions
- 37.8. Internal Functions
- 37.9. C-Language Functions
- 37.6. Function Volatility Categories
- 37.9.1. Dynamic Loading- 37.9.2. Base Types in C-Language Functions
- 37.9.3. Version 0 Calling Conventions
- 37.9.4. Version 1 Calling Conventions
- 37.9.5. Writing Code
- 37.9.6. Compiling and Linking Dynamically-loaded Functions
- 37.9.7. Composite-type Arguments
- 37.9.8. Returning Rows (Composite Types)
- 37.9.9. Returning Sets
- 37.9.10. Polymorphic Arguments and Return Types
- 37.9.11. Transform Functions
- 37.9.12. Shared Memory and LWLocks
- 37.9.13. Using C++ for Extensibility
- 37.9.2. Base Types in C-Language Functions
 
- 37.9.1. Dynamic Loading
- 37.10. User-defined Aggregates
- 37.11. User-defined Types- 37.12. User-defined Operators
- 37.13. Operator Optimization Information
- 37.12. User-defined Operators
- 37.14. Interfacing Extensions To Indexes
- 37.15. Packaging Related Objects into an Extension
- 37.16. 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 37.3) 
- aggregates (starting in Section 37.10) 
- data types (starting in Section 37.11) 
- operators (starting in Section 37.12) 
- operator classes for indexes (starting in Section 37.14) 
- packages of related objects (starting in Section 37.15) 

