DROP FUNCTION 中文man頁面
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)]