DROP FUNCTION
Drops a SQL function or User Defined Function (UDF) from the Vertica catalog.
Syntax
DROP FUNCTION [schema.]function‑name[,...] ( [ arg‑list ] )
Parameters
schema |
Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example: myschema.thisDbObject |
function‑name | The SQL function to drop. |
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
One of the following:
- Superuser
- Schema or function owner
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, so if you drop a SQL function where other objects reference it (such as views or other SQL functions), Vertica returns an error when those objects are used and not when the function is dropped.
Example
The following command drops the zerowhennull
function in the macros
schema:
=> DROP FUNCTION macros.zerowhennull(x INT); DROP FUNCTION