DROP FUNCTION 中文man頁(yè)面
NAME
DROP FUNCTION - 刪除一個(gè)函數(shù)
SYNOPSIS
DROP FUNCTION name ( [ type [, ...] ] ) [ CASCADE | RESTRICT ]
DESCRIPTION 描述
DROP FUNCTION 將刪除一個(gè)現(xiàn)存的函數(shù)的引用。 要執(zhí)行這條命令,用戶必須是函數(shù)的所有者。 必須聲明函數(shù)的參數(shù)類型,因?yàn)閹讉€(gè)不同的函數(shù)可能會(huì)有同樣的名字和不同的參數(shù)列表。
PARAMETERS 參數(shù)
- name
現(xiàn)存的函數(shù)名稱(可以有模式修飾)。- type
函數(shù)參數(shù)的類型。- CASCADE
自動(dòng)刪除依賴于函數(shù)的對(duì)象(比如操作符或觸發(fā)器)。- RESTRICT
如果有任何依賴對(duì)象存在,則拒絕刪除該函數(shù)。這個(gè)是缺省。
EXAMPLES 例子
這條命令刪除平方根函數(shù):
DROP FUNCTION sqrt(integer);
COMPATIBILITY 兼容性
在 SQL 標(biāo)準(zhǔn)里定義了一個(gè) DROP FUNCTION 語(yǔ)句。 但和這條命令不兼容。
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)]