UDF Locations | SQL External Routine Programming | Teradata Vantage - UDF Locations - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
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.