1DROP FUNCTION(7) PostgreSQL 9.2.24 Documentation DROP FUNCTION(7)
2
3
4
6 DROP_FUNCTION - remove a function
7
9 DROP FUNCTION [ IF EXISTS ] name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
10 [ CASCADE | RESTRICT ]
11
13 DROP FUNCTION removes the definition of an existing function. To
14 execute this command the user must be the owner of the function. The
15 argument types to the function must be specified, since several
16 different functions can exist with the same name and different argument
17 lists.
18
20 IF EXISTS
21 Do not throw an error if the function does not exist. A notice is
22 issued in this case.
23
24 name
25 The name (optionally schema-qualified) of an existing function.
26
27 argmode
28 The mode of an argument: IN, OUT, INOUT, or VARIADIC. If omitted,
29 the default is IN. Note that DROP FUNCTION does not actually pay
30 any attention to OUT arguments, since only the input arguments are
31 needed to determine the function's identity. So it is sufficient to
32 list the IN, INOUT, and VARIADIC arguments.
33
34 argname
35 The name of an argument. Note that DROP FUNCTION does not actually
36 pay any attention to argument names, since only the argument data
37 types are needed to determine the function's identity.
38
39 argtype
40 The data type(s) of the function's arguments (optionally
41 schema-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
52 This command removes the square root function:
53
54 DROP FUNCTION sqrt(integer);
55
57 A DROP FUNCTION statement is defined in the SQL standard, but it is not
58 compatible with this command.
59
61 CREATE FUNCTION (CREATE_FUNCTION(7)), ALTER FUNCTION
62 (ALTER_FUNCTION(7))
63
64
65
66PostgreSQL 9.2.24 2017-11-06 DROP FUNCTION(7)