The current user must be the owner of the database function or have the DROPIN privilege for the schema to which the database function is assigned.
More information: SQL Reference Manual, Privilege Specification for a Schema (schema_priv_spec)
The database is in the ONLINE operational state.
SQL Reference Manual, DROP FUNCTION Statement (drop_function_statement)