SET SESSION UDFSEARCHPATH Example | Teradata Vantage - 17.05 - Example: SET SESSION UDFSEARCHPATH - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)
CREATE FUNCTION functions.bitor(A INTEGER,B INTEGER,C INTEGER)
RETURNS INTEGER
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
COLLATION INVOKER INLINE TYPE 1 RETURN
(CASE WHEN A=0 THEN 0
ELSE 2 END);

This SET SESSION UDFSEARCHPATH statement will first search functions, then SYSLIB, and finally TD_SYSFNLIB for bitor:

SET SESSION UDFSEARCHPATH = functions, SYSLIB, TD_SYSFNLIB FOR FUNCTION = bitor;