ALTER FUNCTION Syntax Elements - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-22
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantageā„¢
database_name_1
The containing database for specific_function_name, if something other than the current database.
user_name_1
The containing user for specific_function_name, if something other than the current user.
specific_function_name
The specific function name for the function to be altered.
database_name_2
The containing database for function_name, if other than the current database.
user_name_2
The containing user for function_name, if other than the current user.
function_name
Name of the function to alter.
data_type
An optional data type specification for the parameters passed to function_name.
If you do not specify a data type list, then the specified function must be the only one with that name in the database.
UDT_name
The name of any UDT included in the list of data types for function_name.
EXECUTE PROTECTED
Change the execution mode for the specified function from unprotected mode to protected mode. For details, see ALTER FUNCTION in Teradata Vantageā„¢ - SQL Data Definition Language Detailed Topics, B035-1184.
EXECUTE NOT PROTECTED
Change the execution mode for the specified function from protected mode to unprotected mode.
This option is not valid for Java UDFs.
COMPILE
This option performs the following actions:
C or C++ function Java function
Recompiles the code source for the specified function. Recompiles the code source for the specified function.
Generates the object code. Generates the object code.
Recreates the .so file. Distributes the related JAR files for the function.
Distributes the .so file to all nodes of the system.  
The existing function object is replaced by the recompiled version.
ONLY
Recompile the UDF only. When you specify this option, Vantage does not distribute a new dynamic linked library to database nodes.
When you load a UDF onto another platform of a different type, the system marks it as not valid, and it must be recompiled. If there are many UDFs in one database, it saves time to specify the ONLY option for all recompilations to avoid having to generate and distribute a new library, until the last one is compiled in that database leaving off the ONLY option.
The COMPILE ONLY option is not valid for Java UDFs.