17.10 - C/C++ Function Name - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

The name of the function in the C or C++ source code follows the C function naming conventions, with the additional restriction that the name cannot be longer than 30 characters.

In C++, the function definition must be preceded by extern "C" so that the function name is not converted to a C++ overloaded name. For example:

extern "C" 
void f1( INTEGER *a, INTEGER *result, char sqlstate[6])

The function can call any module written in C++.

When you use the CREATE FUNCTION or REPLACE FUNCTION statement to install the UDF, you specify the name of the C or C++ function. For more information, see Specifying the C/C++ Function Name.

On a Linux system, long names can sometimes cause errors when you install a UDF. For more information, see Troubleshooting "Arg list too long" and "Argument list too long" Errors.

For information on how the name of the C or C++ function relates to UDF name overloading, see Function Name Overloading.