UDF Invocation | SQL Operators & User-Defined Functions | Teradata Vantage - 17.10 - UDF Invocation - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Programming Reference
Publication ID
B035-1210-171K
Language
English (United States)

UDF Search Precedence

UDFs can be located in any database, so the best practice is to use the fully qualified name of the function, including the containing database, when you invoke any kind of UDF. When a function call is qualified by a database name, Teradata Vantage looks first for the UDF in the specified database.

If you omit the database name, Vantage searches locations to find the UDF using the following order of precedence:
  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.
  3. Search the default database for a function with the same name and number of parameters as the function call.
  4. Search the SYSLIB database for a function with the same name and number of parameters as the function call.