DROP PROCEDURE

An SQL command for removing a procedure

DROP PROCEDURE is a DDL command for removing a procedure.

DROP PROCEDURE was added in PostgreSQL 11.

Change history

Examples

postgres=# CREATE PROCEDURE foo(INOUT bar INT) LANGUAGE SQL AS 'SELECT bar + 1';
CREATE PROCEDURE

postgres=# DROP PROCEDURE foo(INT);
DROP PROCEDURE

Attempting to drop a non-existent procedure:

postgres=# DROP PROCEDURE bar(INT);
ERROR:  procedure bar(integer) does not exist

Categories

DDL, Functions and procedures, SQL command

See also

DROP ROUTINE, DROP FUNCTION, CREATE PROCEDURE, ALTER PROCEDURE