postgresql_16:6.1.16 Interfacing Extensions to Indexes
PostgreSQL 16 > Server Programming > Extending SQL > Interfacing Extensions to Indexes
The procedures described thus far let you define new types, new functions, and new operators. However, we cannot yet define an index on a column of a new data type. To do this, we must define an *operator class* for the new data type. Later in this section, we will illustrate this concept in an example: a new operator class for the B-tree index method that stores and sorts complex numbers in ascending absolute value order.
Operator classes can be grouped into *operator families* to show the relationships between semantically compatible classes. When only a single data type is involved, an operator class is sufficient, so we'll focus on that case first and then return to operator families.
Subsections
- postgresql_16:6.1.16.1 Index Methods and Operator Classes
- postgresql_16:6.1.16.2 Index Method Strategies
- postgresql_16:6.1.16.3 Index Method Support Routines
- postgresql_16:6.1.16.4 An Example
- postgresql_16:6.1.16.5 Operator Classes and Operator Families
- postgresql_16:6.1.16.6 System Dependencies on Operator Classes
- postgresql_16:6.1.16.7 Ordering Operators
- postgresql_16:6.1.16.8 Special Features of Operator Classes