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.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.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 Teradata Database, see the Teradata Downloads article, Developing Database Extensions (UDFs, etc.).