DROP PROCEDURE v16
Name
DROP PROCEDURE
— Remove a procedure.
Synopsis
Description
DROP PROCEDURE
removes the definition of an existing procedure. To execute this command, you must be a superuser or the owner of the procedure. For an overloaded procedure, you must specify all input (IN
, IN OUT
) argument data types to the procedure.
This requirement isn't compatible with Oracle databases. In Oracle, specify only the procedure name. EDB Postgres Advanced Server allows overloading of procedure names. Therefore the procedure signature given by the input argument data types is required in the EDB Postgres Advanced Server DROP PROCEDURE
command for an overloaded procedure.
The IF EXISTS
, CASCADE
, and RESTRICT
parameters aren't compatible with Oracle databases. Only EDB Postgres Advanced Server uses them.
Parameters
IF EXISTS
Specifies not to throw an error if the procedure doesn't exist. A notice is issued instead.
name
The name (optionally schema-qualified) of an existing procedure.
argmode
The mode of an argument: IN
, IN OUT
, or OUT
. The default is IN
. DROP PROCEDURE
ignores OUT
arguments, since only the input arguments are needed to determine the procedure’s identity. List only the IN
and IN OUT
arguments.
!!! Note
Specifying argmode
isn't compatible with Oracle databases. It applies only to EDB Postgres Advanced Server.
argname
The name of an argument. DROP PROCEDURE
ignores argument names, since only the argument data types are needed to determine the procedure’s identity.
!!! Note
Specifying argname
isn't compatible with Oracle databases. It applies only to EDB Postgres Advanced Server.
argtype
The data type of an argument of the procedure.
!!! Note
Specifying argtype
isn't compatible with Oracle databases. It applies only to EDB Postgres Advanced Server.
CASCADE
Drop objects that depend on the procedure and all objects that depend on those objects.
RESTRICT
Prevent dropping the procedure if any objects depend on it. This is the default.
Examples
This example removes the select_emp
procedure:
See also
CREATE PROCEDURE, ALTER PROCEDURE
export const _frontmatter = {"title":"DROP PROCEDURE","legacyRedirectsGenerated":["/edb-docs/d/edb-postgres-advanced-server/reference/database-compatibility-for-oracle-developers-reference-guide/9.6/Database_Compatibility_for_Oracle_Developers_Reference_Guide.1.064.html","/edb-docs/d/edb-postgres-advanced-server/user-guides/database-compatibility-for-oracle-developers-guide/9.5/Database_Compatibility_for_Oracle_Developers_Guide.1.092.html"],"redirects":["/epas/latest/epas_compat_sql/50_drop_procedure/"]}
- On this page
- Name
- Synopsis
- Description