DROP FUNCTION
Drops an SQL function or user‑defined functions (UDFs) from the Vertica catalog.
Syntax
DROP FUNCTION [ IF EXISTS ] [[database.]schema.]function[,…] ( [ arg‑list ] )
Parameters
IF EXISTS |
Specifies not to report an error if the function to drop does not exist. Use this clause in SQL scripts to avoid errors on dropping non-existent objects before attempting to create them. |
[database.]schema |
Specifies a schema, by default myschema.thisDbObject If you specify a database, it must be the current database. |
function |
The SQL or user-defined function (UDF) to drop, where UDFs can be one of the following types: You drop aggregate and transformation functions with |
arg‑list
|
A comma-delimited list of arguments as defined for this function when it was created, specified as follows:
where arg‑name optionally qualifies arg‑type:
|
Privileges
Non-superuser, one of the following:
- Owner or DROP privilege
- USAGE privilege on schema
Requirements
- To drop a function, you must specify the argument types because several functions might share the same name with different parameters.
- Vertica does not check for dependencies when you drop a SQL function, so if other objects reference it (such as views or other SQL functions), Vertica returns an error only when those objects are used.
Example
The following command drops the zerowhennull
function in the macros
schema:
=> DROP FUNCTION macros.zerowhennull(x INT); DROP FUNCTION
See Also