16.20 - Installing the Function - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
April 2020
Content Type
Programming Reference
Publication ID
English (United States)

After you write and test a function, you can install it on the server.

In general, you should not create UDFs, UDMs, or external stored procedures in Teradata system databases such as SYSLIB or SYSUDTLIB. These databases are primarily used for Teradata system UDFs, UDTs, UDMs, and external stored procedures only, and they usually contain a large number of these system external routines. Every time you create, alter, or drop your external routine in these databases, Teradata must relink your routine to all the objects of the system external routines. In addition, to execute your routine, Teradata must load all the shared libraries referenced by the system external routines, and these libraries may not be related to your routine. This is very inefficient. However, note that there are cases where you have to create your UDF in a system database. For example, UDFs used for row level security must reside in the SYSLIB database.