DROP_ROUTINE
remove a routine
- Provided by: postgresql-client-12 (Version: 12.22-0ubuntu0.20.04.4)
- Source: postgresql-12
- Report a bug
remove a routine
DROP ROUTINE [ IF EXISTS ] name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] [, ...]
[ CASCADE | RESTRICT ]
DROP ROUTINE removes the definition of an existing routine, which can be an aggregate function, a normal function, or a procedure. See under DROP AGGREGATE (DROP_AGGREGATE(7)), DROP FUNCTION (DROP_FUNCTION(7)), and DROP PROCEDURE (DROP_PROCEDURE(7)) for the description of the parameters, more examples, and further details.
To drop the routine foo for type integer:
DROP ROUTINE foo(integer);
This command will work independent of whether foo is an aggregate, function, or procedure.
This command conforms to the SQL standard, with these PostgreSQL extensions:
DROP AGGREGATE (DROP_AGGREGATE(7)), DROP FUNCTION (DROP_FUNCTION(7)), DROP PROCEDURE (DROP_PROCEDURE(7)), ALTER ROUTINE (ALTER_ROUTINE(7))
Note that there is no CREATE ROUTINE command.