ALTER FUNCTION Syntax Elements - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530
Unless otherwise noted, every syntax element that is a name must follow the rules for naming database objects. See Object Names.
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.
EXECUTE PROTECTED
Change the run mode for the specified function from unprotected mode to protected mode. For details, see When to Specify Unprotected Mode (ALTER FUNCTION External Form).
EXECUTE NOT PROTECTED
Change the run 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 a platform of a different type, the system marks it invalid, and you must recompile it. If there are many UDFs in a database, save time by specifying ONLY for all but the last recompilation, to avoid generating and distributing a new library.
The COMPILE ONLY option is not valid for Java UDFs.