Postgresql 中文操作指南
CREATE OPERATOR FAMILY
CREATE OPERATOR FAMILY — 定义新的运算符族
CREATE OPERATOR FAMILY — define a new operator family
Description
CREATE OPERATOR FAMILY 创建新的运算符族。运算符族定义相关运算符类的集合,还可能定义一些附加运算符和支持函数,这些运算符和支持函数与这些运算符类兼容但不是任何个别索引正常运行所必需的。(对索引至关重要的运算符和函数应分组在相关运算符类中,而不应该“松散”地存在于运算符族中。通常,单数据类型运算符绑定到运算符类,而交叉数据类型运算符可以松散地存在于含有两种数据类型的运算符类的运算符族中。)
CREATE OPERATOR FAMILY creates a new operator family. An operator family defines a collection of related operator classes, and perhaps some additional operators and support functions that are compatible with these operator classes but not essential for the functioning of any individual index. (Operators and functions that are essential to indexes should be grouped within the relevant operator class, rather than being “loose” in the operator family. Typically, single-data-type operators are bound to operator classes, while cross-data-type operators can be loose in an operator family containing operator classes for both data types.)
新运算符族最初是空的。应通过发出后续 CREATE OPERATOR CLASS 命令来添加包含的运算符类,并可选择发出 ALTER OPERATOR FAMILY 命令来添加“松散”运算符及其对应的支持函数,从而对其进行填充。
The new operator family is initially empty. It should be populated by issuing subsequent CREATE OPERATOR CLASS commands to add contained operator classes, and optionally ALTER OPERATOR FAMILY commands to add “loose” operators and their corresponding support functions.
如果指定了模式名称,则在指定的模式中创建运算符族。否则,则在当前模式中创建运算符族。同一模式中的两个运算符族只有在针对不同的索引方法的情况下才可具有相同名称。
If a schema name is given then the operator family is created in the specified schema. Otherwise it is created in the current schema. Two operator families in the same schema can have the same name only if they are for different index methods.
定义运算符族的用户将成为其所有者。目前,创建用户必须是超级用户。(实施此限制是因为错误的运算符族定义可能会混淆甚至使服务器崩溃。)
The user who defines an operator family becomes its owner. Presently, the creating user must be a superuser. (This restriction is made because an erroneous operator family definition could confuse or even crash the server.)
有关更多信息,请参阅 Section 38.16 。
Refer to Section 38.16 for further information.
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 this operator family is for.
-