1DROP FUNCTION(7)                 SQL Commands                 DROP FUNCTION(7)
2
3
4

NAME

6       DROP FUNCTION - remove a function
7
8

SYNOPSIS

10       DROP FUNCTION [ IF EXISTS ] name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
11           [ CASCADE | RESTRICT ]
12
13

DESCRIPTION

15       DROP  FUNCTION  removes the definition of an existing function. To exe‐
16       cute this command the user must be the owner of the function. The argu‐
17       ment  types  to the function must be specified, since several different
18       functions can exist with the same name and different argument lists.
19

PARAMETERS

21       IF EXISTS
22              Do not throw an error if the function does not exist.  A  notice
23              is issued in this case.
24
25       name   The name (optionally schema-qualified) of an existing function.
26
27       argmode
28              The  mode of an argument: IN, OUT, INOUT, or VARIADIC.  If omit‐
29              ted, the default is IN.  Note that DROP FUNCTION does not  actu‐
30              ally  pay  any  attention to OUT arguments, since only the input
31              arguments are needed to determine the function's  identity.   So
32              it is sufficient to list the IN, INOUT, and VARIADIC arguments.
33
34       argname
35              The name of an argument.  Note that DROP FUNCTION does not actu‐
36              ally pay any attention to argument names, since only  the  argu‐
37              ment data types are needed to determine the function's identity.
38
39       argtype
40              The data type(s) of the function's arguments (optionally schema-
41              qualified), if any.
42
43       CASCADE
44              Automatically drop objects that depend on the function (such  as
45              operators or triggers).
46
47       RESTRICT
48              Refuse to drop the function if any objects depend on it. This is
49              the default.
50

EXAMPLES

52       This command removes the square root function:
53
54       DROP FUNCTION sqrt(integer);
55
56

COMPATIBILITY

58       A DROP FUNCTION statement is defined in the SQL standard, but it is not
59       compatible with this command.
60

SEE ALSO

62       CREATE   FUNCTION  [create_function(7)],  ALTER  FUNCTION  [alter_func‐
63       tion(7)]
64
65
66
67SQL - Language Statements         2011-09-22                  DROP FUNCTION(7)
Impressum