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

SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2023-04-27
dita:mapPath
qqu1556127655717.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1210
lifecycle
previous
Product Category
Teradata Vantage™

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.