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.
- The path specified by the SET SESSION UDFSEARCHPATH statement, if set. See Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
- If the UDF implements cast, ordering, or transform functionality for a UDT, search the SYSUDTLIB database.
- Search the default database for a function with the same name and number of parameters as the function call.
- Search the SYSLIB database for a function with the same name and number of parameters as the function call.