UDF Locations | SQL External Routine Programming | Teradata Vantage - UDF Locations - 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
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

When a function call is qualified by a database name, Vantage looks for the UDF in the specified database only.

If you omit the database name, Vantage searches for the UDF in the following order:

  1. The path specified by the SET SESSION UDFSEARCHPATH statement, if set. See Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
  2. If the UDF implements cast, ordering, or transform functionality for a UDT, search the SYSUDTLIB database.
    IF such a function … THEN …
    exists, and the arguments in the function call are compatible with the function parameters and follow the order of precedence the search stops.

    If several functions exist, Vantage must decide which function is the best fit. For details, see Calling a Function That is Overloaded.

    does not exist, or the arguments in the function call are not compatible with the function parameters the statement returns an error.
  3. Search the default database for a function with the same name and number of parameters as the function call.
    IF such a function … THEN …
    exists, and the arguments in the function call are compatible with the function parameters and follow the order of precedence the search stops.

    If the database has several functions with the same name, Vantage must decide which function is the best fit. For details, see Calling a Function That is Overloaded.

    does not exist, or the arguments in the function call are not compatible with the function parameters the search continues.
  4. Search the SYSLIB database for a function with the same name and number of parameters as the function call.
    IF such a function … THEN …
    exists, and the arguments in the function call are compatible with the function parameters and follow the order of precedence the search stops.

    If several functions exist, Vantage must decide which function is the best fit. For details, see Calling a Function That is Overloaded.

    does not exist, or the arguments in the function call are not compatible with the function parameters the statement returns an error.

For the rules of compatibility precedence, see Compatible Types.