C/C++ Function Name | External Stored Procedures | Teradata Vantage - C/C++ Function Name - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

The name of the function in the C or C++ source code follows the C function naming conventions, with the additional restrictions that it follows database object naming rules. For more information about object naming, see Teradata Vantageā„¢ - SQL Fundamentals, B035-1141.

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 getregion( VARCHAR_LATIN *region, char sqlstate[6])
{
   ...
}

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

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

On Linux, long names can sometimes cause errors when you install an external stored procedure. For more information, see Argument list too long.