17.10 - ALTER FUNCTION Syntax Elements - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)
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.