DROP PROCEDURE — remove a procedure
DROP PROCEDURE [ IF EXISTS ]
name[ ( [ [
argtype[, ...] ] ) ] [, ...] [ CASCADE | RESTRICT ]
DROP PROCEDURE removes the definition of an existing procedure. To execute this command the user must be the owner of the procedure. The argument types to the procedure must be specified, since several different procedures can exist with the same name and different argument lists.
Do not throw an error if the procedure does not exist. A notice is issued in this case.
The name (optionally schema-qualified) of an existing procedure. If no argument list is specified, the name must be unique in its schema.
The mode of an argument:
VARIADIC. If omitted, the default is
The name of an argument. Note that
DROP PROCEDURE does not actually pay any attention to argument names, since only the argument data types are needed to determine the procedure's identity.
The data type(s) of the procedure's arguments (optionally schema-qualified), if any.
Automatically drop objects that depend on the procedure, and in turn all objects that depend on those objects (see Section 5.13).
Refuse to drop the procedure if any objects depend on it. This is the default.
DROP PROCEDURE do_db_maintenance();
This command conforms to the SQL standard, with these PostgreSQL extensions:
The standard only allows one procedure to be dropped per command.
IF EXISTS option
The ability to specify argument modes and names
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.