NAME
DROP FUNCTION - 删除一个函数
SYNOPSIS
DROP FUNCTION name ( [ type [, ...] ] ) [ CASCADE | RESTRICT ]
DESCRIPTION 描述
DROP FUNCTION 将删除一个现存的函数的引用。 要执行这条命令,用户必须是函数的所有者。 必须声明函数的参数类型,因为几个不同的函数可能会有同样的名字和不同的参数列表。
PARAMETERS 参数
- name
现存的函数名称(可以有模式修饰)。- type
函数参数的类型。- CASCADE
自动删除依赖于函数的对象(比如操作符或触发器)。- RESTRICT
如果有任何依赖对象存在,则拒绝删除该函数。这个是缺省。
EXAMPLES 例子
这条命令删除平方根函数:
DROP FUNCTION sqrt(integer);
COMPATIBILITY 兼容性
在 SQL 标准里定义了一个 DROP FUNCTION 语句。 但和这条命令不兼容。
SEE ALSO 参见
CREATE FUNCTION [create_function(7)], ALTER FUNCTION [alter_function(l)]
#p#
NAME
DROP FUNCTION - remove a function
SYNOPSIS
DROP FUNCTION name ( [ type [, ...] ] ) [ CASCADE | RESTRICT ]
DESCRIPTION
DROP FUNCTION removes the definition of an existing function. To execute this command the user must be the owner of the function. The argument types to the function must be specified, since several different functions may exist with the same name and different argument lists.
PARAMETERS
- name
- The name (optionally schema-qualified) of an existing function.
- type
- The data type of an argument of the function.
- CASCADE
- Automatically drop objects that depend on the function (such as operators or triggers).
- RESTRICT
- Refuse to drop the function if any objects depend on it. This is the default.
EXAMPLES
This command removes the square root function:
DROP FUNCTION sqrt(integer);
COMPATIBILITY
A DROP FUNCTION statement is defined in the SQL standard, but it is not compatible with this command.
SEE ALSO
CREATE FUNCTION [create_function(7)], ALTER FUNCTION [alter_function(l)]