15.00 - Example 3 - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

Example 3

The following example indicates that the header file udf_types.h and the C source file stdvar.c to be used for the UDF are to be found on the client. /headers/udf_types.h is the relative path from the home or current client directory for the logged on user to the header file and /src/stdvar.c is the relative path to the C source file. The function name in the C source code is called stdvar. Both files have the same name on the platform.

    'CI¡udf_types¡headers/udf_types.h¡CS:stdvar¡src/stdvar.c¡F¡stdvar'

The table on the following page summarizes the naming issues for the EXTERNAL NAME clause and its various components.

 

IF you specify this function name …

THEN the source file name is the same as …

AND the function name in DBC.TVM is the same as …

AND the C/C++ function name is the same as …

Comments

function_name only

function_name

function_name

function_name

function_name must be unique within its database.

If you add a new function that has the same function_name within the same database, then you must specify a different specific_function_name to make the two functions distinct.

function_name and
specific_function_name

specific_function_name

specific_function_name

specific_function_name

specific_
function_name
must be unique within its database.

function_name and
external_function_name

external_function_name

function_name

function_entry_name

specific_f
unction_name
must be unique within its database.

If you add a new function that has the same function_name within the same database, then you must specify a different specific_function_name to make the two functions distinct.

function_name and
function_entry_name
as part of 'string'

source_name as specified in 'string'

 

function_name

function_entry_name

function_name and
'string' but no
function_entry_name

function_name

function_name

function_name and
specific_function_name and function_entry_name
but
not as 'string'

external_function_name

specific_function_name

 

 

external_function_name

specific_
function_name
must be unique within its database.

 

 

function_name and
specific_function_name and function_entry_name
as 'string'

 

source_name as specified in 'string'

 

function_entry_name if F option is specified

specific_function_name if F option is not specified