Debugging a UDF | SQL External Routine Programming | Teradata Vantage - Debugging a User-Defined Function - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantageā„¢
When debugging a function, be sure your tests include the following:
  • Limit checks on the input values
  • Limit checks on the return value
  • Proper handling of NULLs
  • Division by zero
  • All memory acquired by malloc is freed
  • All open operating system handles are released/closed

The Teradata C/C++ UDF Debugger allows some user-defined functions to be debugged within the database on a development or test system. The debugger only supports C and C++ functions. For more information on the Teradata C/C++ UDF Debugger, see C/C++ Command-line Debugging for UDFs.

For other user-defined functions, debugging is limited after the function is installed in the database. You can use other debugging tools to verify their functionality, or run them on a stand-alone virtual machine and debug the UDF server processes that executes them.

For an example of how to run, test and debug your function outside of Vantage, see the Teradata Downloads article, Developing Database Extensions (UDFs, etc.).