Indexes and User-Defined Types

The procedures defined so far let you define a new type with functions and operators to go with it. 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.

Unfortunately, there is no simple command to tell PostgreSQL how to use a user-defined type and/or user-defined operator with an index. The Red Hat Database Administrator and User's Guide describes how to manually change the PostgreSQL catalog tables to accomplish that.