Register the operator class
The following statement syntax associates operators with
an access method and places an entry in the sysopclasses system
catalog table for the operator class:
CREATE OPCLASS music_ops FOR music_am
STRATEGIES(higher(note, note), lower(note, note))
SUPPORT(compare_octave(note, note), ...)
You
must specify one or more strategy functions in the CREATE OPCLASS
statement, but you can omit the support function if the access method
includes code to build and maintain indexes. The following example
specifies
none
instead of a support-function name:CREATE OPCLASS special_operators FOR virtual_am
STRATEGIES (LessThan, LessThanOrEqual,
Equal, GreaterThanOrEqual, GreaterThan)
SUPPORT (none)
When an SQL statement requires the access method to build or scan an index, the database server passes the support function names in the relative order in which you name them in the CREATE OPCLASS statement. List support functions in the correct order for the access method to retrieve and execute support tasks. For more information, refer to Using FastPath and the description of accessor functions mi_key_opclass_nsupt() and mi_key_opclass_supt().