UDF Default Location Paths - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Advanced SQL Engine
Teradata Database
Release Number
July 2021
English (United States)
Last Update
Product Category
Teradata Vantage™

Listed below are the default path locations used by UDFs for the following purposes:

  • Store UDF source files
  • Compile UDF source files
  • Store .so files
  • Store shared memory files
The starting path is determined by the PDE config or temp directory:
  • PDE Config directory: pdepath -c
  • PDE Temp directory: pdepath -S

The following table documents the default directory paths for these resources and activities.

Files/Directories Directory Path Description
Header file /etc/opt/teradata/tdconfig/Teradata/tdbs_udf/usr/ Header Files are located along with the source files. Header file sqltypes_td.h must be specified with an include directive in the UDF source.

You can copy this file if you code or compile the UDF outside of the database.

If you supply a header file, the file should be specified in the EXTERNAL NAME clause string encoded with the 'I' symbol.

Source directory path /etc/opt/teradata/tdconfig/Teradata/tdbs_udf/usr/ Default directory to search for source files.
If the source or object file is on the server in this directory, you can specify the relative path from this directory for any server components specified in the external name string, such as:
  • Include
  • Object
  • Package
  • Source
Compiler path /usr/bin/gcc Default directory to search for the C/C++ compiler.
Linker path /usr/bin/ld Default directory to search for the C/C++ linker.
Compiler temporary path /var/opt/teradata/tdtemp/UDFTemp/ Temporary directory where UDFs are compiled

Any files needed for the compilation process are moved here. This includes source files from the server or client as well as object and header files, if needed.

Temporary compilation directories only exist during the duration of a compilation.

UDF library path /etc/opt/teradata/tdconfig/udflib/ Read-only directory where dynamically linked libraries are stored.
UDF server memory path /var/opt/teradata/tdtemp/udfsrv/ Directory where shared memory files used for the execution of protected mode UDFs are stored.