15.10 - USING mask_string FOR - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Teradata Database
December 2015
Programming Reference

Output tracing is enabled for all user-defined functions or external SQL procedures the current user performs in subsequent DML requests in the current session.

The UDF trace output is written to the materialized global temporary trace table defined by table_name.

An arbitrary character string to be interpreted by any UDF performed in the current session.
An arbitrary character string to be interpreted by any UDF performed by the current session.
The string is limited to 256 logical characters in the character set defined for the user. This means, for example, that the string has a maximum length of 256 bytes if the UDF was created under a Latin character data type, but has a maximum length of 512 bytes if created under a Unicode character data type.
UDFs convert this string to the default character data type in effect when the function was created, not the default character data type defined for the user for the session.
All necessary conversions are done by the system. If, for example, a UDF was created with Unicode, but is called by a user with a session character set of Latin, the trace string is translated to Latin before it is passed to the UDF. If a pre-conversion trace string contains characters that have no equivalent in the target character set, the system returns an error. See SQL External Routine Programming for more information.

See CREATE USER for more information about defining default character data types for users.


The following example enables function trace processing for the current session, writing the trace data into the global temporary trace table named udf_diagnostics.

     FOR TABLE udf_diagnostics;