Chapter 39. Extending SQL

Table of Contents

39.1. How Extensibility Works
39.2. The Postgres Pro Type System
39.2.1. Base Types
39.2.2. Container Types
39.2.3. Domains
39.2.4. Pseudo-Types
39.2.5. Polymorphic Types
39.3. User-defined Functions
39.4. User-defined Procedures
39.5. Query Language (SQL) Functions
39.5.1. Arguments for SQL Functions
39.5.2. SQL Functions on Base Types
39.5.3. SQL Functions on Composite Types
39.5.4. SQL Functions with Output Parameters
39.5.5. SQL Functions with Variable Numbers of Arguments
39.5.6. SQL Functions with Default Values for Arguments
39.5.7. SQL Functions as Table Sources
39.5.8. SQL Functions Returning Sets
39.5.9. SQL Functions Returning TABLE
39.5.10. Polymorphic SQL Functions
39.5.11. SQL Functions with Collations
39.6. Function Overloading
39.7. Function Volatility Categories
39.8. Procedural Language Functions
39.9. Internal Functions
39.10. C-Language Functions
39.10.1. Dynamic Loading
39.10.2. Base Types in C-Language Functions
39.10.3. Version 1 Calling Conventions
39.10.4. Writing Code
39.10.5. Compiling and Linking Dynamically-loaded Functions
39.10.6. Composite-type Arguments
39.10.7. Returning Rows (Composite Types)
39.10.8. Returning Sets
39.10.9. Polymorphic Arguments and Return Types
39.10.10. Transform Functions
39.10.11. Shared Memory and LWLocks
39.10.12. Using C++ for Extensibility
39.11. User-defined Aggregates
39.11.1. Moving-Aggregate Mode
39.11.2. Polymorphic and Variadic Aggregates
39.11.3. Ordered-Set Aggregates
39.11.4. Partial Aggregation
39.11.5. Support Functions for Aggregates
39.12. User-defined Types
39.13. User-defined Operators
39.14. Operator Optimization Information
39.14.1. COMMUTATOR
39.14.2. NEGATOR
39.14.3. RESTRICT
39.14.4. JOIN
39.14.5. HASHES
39.14.6. MERGES
39.15. Interfacing Extensions To Indexes
39.15.1. Index Methods and Operator Classes
39.15.2. Index Method Strategies
39.15.3. Index Method Support Routines
39.15.4. An Example
39.15.5. Operator Classes and Operator Families
39.15.6. System Dependencies on Operator Classes
39.15.7. Ordering Operators
39.15.8. Special Features of Operator Classes
39.16. Packaging Related Objects into an Extension
39.16.1. Defining Extension Objects
39.16.2. Extension Files
39.16.3. Extension Relocatability
39.16.4. Extension Configuration Tables
39.16.5. Extension Updates
39.16.6. Installing Extensions using Update Scripts
39.16.7. Extension Example
39.17. Extension Building Infrastructure

In the sections that follow, we will discuss how you can extend the Postgres Pro SQL query language by adding: