This example assumes that you are using the config YAML file and environment variables described in Example: Creating a C UDF to define the user credentials.
Prerequisites
- You must have the DROP FUNCTION privilege on the UDF or on the database containing the UDF.
- You must remove the UDF from any constraint objects that reference the UDF before dropping the UDF.
See ALTER CONSTRAINT.
Dropping a UDF
Use the tdextroutine udf drop subcommand to remove the definition of an existing UDF.
tdextroutine udf drop UDF_ID
UDF_ID identifies the UDF. The ID is returned by the udf create subcommand or the udf list subcommand.For example, the UDF_ID returned in the previous udf list example is AAA0DgAA, so you can drop that UDF using the following command:
tdextroutine udf drop AAA0DgAA
If UDF_ID includes a slash (/) character, you must specify %2F to encode it. Slash is a reserved character.
Instead of specifying UDF_ID, you can also do one of the following:
- Use the -f option and specify the function_name
- Use the -n option and specify the specific_name
For details about all the options of the udf drop subcommand, see tdextroutine UDF Subcommands and Options.