Interfacing Extensions To Indexes

PostgreSQL 7.2 Documentation
Prev |  | Next

# Chapter 17. Interfacing Extensions To Indexes

# 17.1. Introduction

The procedures described thus far let you define new types, new functions, and new operators. However, we cannot yet define a secondary index (such as a B-tree, R-tree, or hash access method) over a new type or its operators.

Look back at Figure 11-1. The right half shows the catalogs that we must modify in order to tell PostgreSQL how to use a user-defined type and/or user-defined operators with an index (i.e., `pg_am, pg_amop, pg_amproc, pg_operator` and `pg_opclass`). Unfortunately, there is no simple command to do this. We will demonstrate how to modify these catalogs through a running example: a new operator class for the B-tree access method that stores and sorts complex numbers in ascending absolute value order.

Prev | Home | Next
Rules versus Triggers | Up | Access Methods