Function Usage Information | CREATE/REPLACE FUNCTION | Teradata Vantage - Function Identifiers - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

Function names are distinct from specific function names, external function names, and function entry point names. See Function Name, Function Class Clause, EXTERNAL NAME Clause, and UDF Default Location Paths.

The following table briefly outlines the differences among the different function identifiers:

Function Identifier Syntax Variable Name Definition
Function name function_name The identifier used to call the function from an SQL statement.

If no specific name is assigned to the function, then the name stored in the data dictionary is function_name.

If a specific name is assigned to the function, then function_name is not the name by which the dictionary knows the function as a database object, and it need not be unique within its database.

Specific function name specific_function_name The identifier used to define the function as a database object in the dictionary table DBC.TVM.
External function name external_function_name The external function name for a C or C++ external routine can be expressed in two ways:
  • As an identifier that names the entry point for the function object. Case is significant, and the name must match the name of the C or C++ function body.
  • As a string that identifies a client-defined path to the C or C++ function source code.

An external function name is mandatory for a Java external routine when you specify JAVA in the Language clause.

In this case, external_function_name is referred to as an external Java reference string.

The external Java reference string specifies the JAR file, Java class within the JAR, and the Java method within the class that is to be invoked when the Java UDF is executed.

  • The first part is the JAR_ID. This is the registered name of the associated JAR file. You must create this name using the external procedure SQLJ.INSTALL_JAR.
  • The second part is the name of the Java class contained within the JAR that contains the Java method to execute.
  • The third part is the name of the method that is executed.

For example, if you have a JAR file that has been registered in the database with the ID salesreports, and the class within the JAR is named formal, and the method within the class to be called is named monthend, then the string salesreports:formal.monthend completely defines the exact method to invoke when the Java UDF is executed.

Function entry point name function_entry_point_name The identifier used to define the entry point name of the function.

A function entry point name must be specified if its name is different than the function name or specific function names defined for the function.

You cannot specify function_entry_
point_name more than one time in the EXTERNAL clause of the CREATE FUNCTION or REPLACE FUNCTION statements.