Teradata PT can be called from within an external stored procedure (XSP). An XSP is a code module, written in C or C++, which resides on the database and is executed using the SQL CALL statement. Using Teradata PT in an XSP provides a potential performance improvement by minimizing data transfer between the client and the database server.
Calling the Teradata PT from within an XSP is only supported when using Teradata Database 12.0 or later. Using Teradata PT in a user-defined function (UDF) is not currently supported.