CREATE OPERATOR FAMILY
CREATE OPERATOR FAMILY — Define a new operator family
Synopsis
CREATE OPERATOR FAMILY name USING index_method
Description
CREATE OPERATOR FAMILY creates a new operator family. An operator family defines a collection of related operator classes, and may also include additional operators and support functions that are compatible with those operator classes but not essential for the functioning of any individual index. (Operators and functions essential for indexing should be grouped in related operator classes rather than being placed "loosely" in the operator family. Typically, single-data-type operators are confined to operator classes, while cross-data-type operators can exist loosely in an operator family that contains operator classes for both data types.)
The new operator family is initially empty. Operator classes should be added by issuing subsequent CREATE OPERATOR CLASS commands, and "loose" operators and their corresponding support functions can be added using the optional ALTER OPERATOR FAMILY command.
If a schema name is given, the operator family will be created in the specified schema. Otherwise, it will be created in the current schema. Two operator families in the same schema can only have the same name if they are for different index methods.
The user who defines an operator family becomes its owner. Currently, the creating user must be a superuser (this restriction exists because an incorrect operator family can confuse or even crash the server).
Parameters
name
The name of the operator family to be created. The name can be schema-qualified.
index_method
The name of the index method that this operator family is for.
See Also
ALTER OPERATOR FAMILY, DROP OPERATOR FAMILY, CREATE OPERATOR CLASS, ALTER OPERATOR CLASS, DROP OPERATOR CLASS