Who Can Drop an Exception
The DROP EXCEPTION
statement can be executed by:
-
The owner of the exception
-
Users with the
DROP ANY EXCEPTION
privilege
The DROP EXCEPTION
statement can be executed by:
The owner of the exception
Users with the DROP ANY EXCEPTION
privilege
DROP EXCEPTION
ExamplesE_LARGE_VALUE
DROP EXCEPTION E_LARGE_VALUE;
RECREATE EXCEPTION
Drops a custom exception if it exists, and creates a custom exception
DSQL
RECREATE EXCEPTION exception_name '<message>'
!! See syntax of CREATE EXCEPTION
for further rules !!
The statement RECREATE EXCEPTION
creates a new exception for use in PSQL modules.If an exception with the same name exists already, the RECREATE EXCEPTION
statement will try to drop it and create a new one.If there are any dependencies on the existing exception, the attempted deletion fails and RECREATE EXCEPTION
is not executed.
RECREATE EXCEPTION
ExampleE_LARGE_VALUE
exceptionRECREATE EXCEPTION E_LARGE_VALUE
'The value exceeds its limit';