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.
Required Privileges
You must have the DROP FUNCTION privilege on the UDF or on the database containing the UDF to replace an existing function. You do not need the CREATE FUNCTION privilege to replace a function.
- If the UDF does not exist, you must have the CREATE FUNCTION privilege on the database in which you want to create the UDF.
For information on how to get these privileges, see SQL Data Control Language .
Replacing a UDF
Use the tdextroutine udf replace subcommand to create a new UDF or replace an existing UDF.
The options for udf replace are the same as for udf create.
For example:
tdextroutine udf replace -s ./udf_src -d MarketingDB udfSubStr
For details about all the options of the udf replace subcommand, see tdextroutine UDF Subcommands and Options.