Chapter 38. Extending SQL
Table of Contents
- 38.1. How Extensibility Works- 38.2. The Postgres Pro Type System
- 38.3. User-defined Functions- 38.4. Query Language (SQL) Functions
- 38.4.1. Arguments for SQL Functions- 38.4.2. SQL Functions on Base Types
- 38.4.3. SQL Functions on Composite Types
- 38.4.4. SQL Functions with Output Parameters
- 38.4.5. SQL Functions with Variable Numbers of Arguments
- 38.4.6. SQL Functions with Default Values for Arguments
- 38.4.7. SQL Functions as Table Sources
- 38.4.8. SQL Functions Returning Sets
- 38.4.9. SQL Functions Returning
TABLE
- 38.4.10. Polymorphic SQL Functions
- 38.4.11. SQL Functions with Collations
- 38.4.2. SQL Functions on Base Types
 
- 38.4.1. Arguments for SQL Functions
- 38.5. Function Overloading- 38.6. Function Volatility Categories
- 38.7. Procedural Language Functions
- 38.8. Internal Functions
- 38.9. C-Language Functions
- 38.6. Function Volatility Categories
- 38.9.1. Dynamic Loading- 38.9.2. Base Types in C-Language Functions
- 38.9.3. Version 1 Calling Conventions
- 38.9.4. Writing Code
- 38.9.5. Compiling and Linking Dynamically-loaded Functions
- 38.9.6. Composite-type Arguments
- 38.9.7. Returning Rows (Composite Types)
- 38.9.8. Returning Sets
- 38.9.9. Polymorphic Arguments and Return Types
- 38.9.10. Transform Functions
- 38.9.11. Shared Memory and LWLocks
- 38.9.12. Using C++ for Extensibility
- 38.9.2. Base Types in C-Language Functions
 
- 38.9.1. Dynamic Loading
- 38.10. User-defined Aggregates
- 38.11. User-defined Types- 38.12. User-defined Operators
- 38.13. Operator Optimization Information
- 38.12. User-defined Operators
- 38.14. Interfacing Extensions To Indexes
- 38.15. Packaging Related Objects into an Extension
- 38.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 38.3) 
- aggregates (starting in Section 38.10) 
- data types (starting in Section 38.11) 
- operators (starting in Section 38.12) 
- operator classes for indexes (starting in Section 38.14) 
- packages of related objects (starting in Section 38.15) 

