15.10 - function_name - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

Calling name for the SQL function.

For information about naming database objects, see SQL Fundamentals, B035-1141.

This clause is mandatory for all UDFs.

If you use function_name to identify the function, take care to follow the identifier naming conventions of the programming language in which it is written.

You cannot give a UDF the same name as an existing Teradata Database-supplied function (also known as an intrinsic function) unless you enclose the name in QUOTATION MARK characters. For example, “TRIM”(). Using the names of intrinsic functions for UDFs is a poor programming practice and should be avoided.

A UDT and a UDF without parameters that is stored in SYSUDTLIB cannot have the same name.

Parameter data types and number of parameters are used to distinguish among different functions within the same class that have the same function_name.

database_name
user_name
An optional database or user name specified if the function is to be created or replaced in a non-default database or user.
If you use the SYSLIB database as your UDF depository, you must modify the size of its permanent space and grant appropriate privileges on it because it is created with 0 permanent space and without access privileges.
Users must have the EXECUTE FUNCTION privilege on any UDF they run or on the database containing the function.
If you do not specify a database name, then the system creates or replaces the function within the current database.