1DROP PROCEDURE(7)        PostgreSQL 13.3 Documentation       DROP PROCEDURE(7)
2
3
4

NAME

6       DROP_PROCEDURE - remove a procedure
7

SYNOPSIS

9       DROP PROCEDURE [ IF EXISTS ] name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] [, ...]
10           [ CASCADE | RESTRICT ]
11

DESCRIPTION

13       DROP PROCEDURE removes the definition of an existing procedure. To
14       execute this command the user must be the owner of the procedure. The
15       argument types to the procedure must be specified, since several
16       different procedures can exist with the same name and different
17       argument lists.
18

PARAMETERS

20       IF EXISTS
21           Do not throw an error if the procedure does not exist. A notice is
22           issued in this case.
23
24       name
25           The name (optionally schema-qualified) of an existing procedure. If
26           no argument list is specified, the name must be unique in its
27           schema.
28
29       argmode
30           The mode of an argument: IN or VARIADIC. If omitted, the default is
31           IN.
32
33       argname
34           The name of an argument. Note that DROP PROCEDURE does not actually
35           pay any attention to argument names, since only the argument data
36           types are needed to determine the procedure's identity.
37
38       argtype
39           The data type(s) of the procedure's arguments (optionally
40           schema-qualified), if any.
41
42       CASCADE
43           Automatically drop objects that depend on the procedure, and in
44           turn all objects that depend on those objects (see Section 5.14).
45
46       RESTRICT
47           Refuse to drop the procedure if any objects depend on it. This is
48           the default.
49

EXAMPLES

51           DROP PROCEDURE do_db_maintenance();
52

COMPATIBILITY

54       This command conforms to the SQL standard, with these PostgreSQL
55       extensions:
56
57       •   The standard only allows one procedure to be dropped per command.
58
59       •   The IF EXISTS option
60
61       •   The ability to specify argument modes and names
62

SEE ALSO

64       CREATE PROCEDURE (CREATE_PROCEDURE(7)), ALTER PROCEDURE
65       (ALTER_PROCEDURE(7)), DROP FUNCTION (DROP_FUNCTION(7)), DROP ROUTINE
66       (DROP_ROUTINE(7))
67
68
69
70PostgreSQL 13.3                      2021                    DROP PROCEDURE(7)
Impressum