DROP AGGREGATE FUNCTION
Drops a User Defined Aggregate Function (UDAF) from the Vertica catalog.
Syntax
DROP AGGREGATE FUNCTION [schema.]function-name [, ...] ... ( [ [argname] argtype[,...] ] )
Parameters
schema |
Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example: myschema.thisDbObject |
function-name |
Specifies a name of the SQL function to drop. If the function name is schema-qualified, the function is dropped from the specified schema (as noted above). |
argname |
Specifies the name of the argument, typically a column name. |
argtype |
Specifies the data type for argument(s) that are passed to the function. Argument types must match Vertica type names. See SQL Data Types. |
Notes
- 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.
Privileges
One of the following:
- Superuser
- Owner
Example
The following command drops the ag_avg
function:
=> DROP AGGREGATE FUNCTION ag_avg(numeric); DROP AGGREGATE FUNCTION