NAME
DROP OPERATOR - 删除一个操作符
SYNOPSIS
DROP OPERATOR name ( lefttype | NONE , righttype | NONE ) [ CASCADE | RESTRICT ]
DESCRIPTION 描述
DROP OPERATOR 语句从数据库中删除一个现存的操作符。 要执行这个命令,你必须是操作符所有者。
PARAMETERS 参数
- name
一个现存的操作符的名字(可以有模式修饰)。- lefttype
该操作符左参数的类型。如果该操作符没有左参数, 写 NONE。- righttype
该操作符右参数的类型。如果该操作符没有右参数, 写 NONE。- CASCADE
自动删除依赖于此操作符的对象。- RESTRICT
如果有任何依赖对象则拒绝删除此操作符。这个是缺省。
EXAMPLES 例子
将用于integer的幂操作符 a^n 删除:
DROP OPERATOR ^ (integer, integer);
为类型 bit 删除左单目位操作符 ~b: ~b for type bit:
DROP OPERATOR ~ (none, bit);
删除用于 integer 的阶乘 (x!) :
DROP OPERATOR ! (integer, none);
COMPATIBILITY 兼容性
在 SQL 标准里没有 DROP OPERATOR 语句。
SEE ALSO 参见
CREATE OPERATOR [create_operator(7)]
#p#
NAME
DROP OPERATOR - remove an operator
SYNOPSIS
DROP OPERATOR name ( lefttype | NONE , righttype | NONE ) [ CASCADE | RESTRICT ]
DESCRIPTION
DROP OPERATOR drops an existing operator from the database system. To execute this command you must be the owner of the operator.
PARAMETERS
- name
- The name (optionally schema-qualified) of an existing operator.
- lefttype
- The data type of the operator's left operand; write NONE if the operator has no left operand.
- righttype
- The data type of the operator's right operand; write NONE if the operator has no right operand.
- CASCADE
- Automatically drop objects that depend on the operator.
- RESTRICT
- Refuse to drop the operator if any objects depend on it. This is the default.
EXAMPLES
Remove the power operator a^b for type integer:
DROP OPERATOR ^ (integer, integer);
Remove the left unary bitwise complement operator ~b for type bit:
DROP OPERATOR ~ (none, bit);
Remove the right unary factorial operator x! for type integer:
DROP OPERATOR ! (integer, none);
COMPATIBILITY
There is no DROP OPERATOR statement in the SQL standard.
SEE ALSO
CREATE OPERATOR [create_operator(7)]