16.20 - FNC_GetXMLResultBlob - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Purpose

Get a result LOB locator that will be used to set the XML return value.

Syntax

void
FNC_GetXMLResultBlob(XML_HANDLE            xmlHandle,
                     LOB_RESULT_LOCATOR*   xmlBlob)
XML_HANDLE xmlHandle
A handle to an XML type that is defined to be a return value for a UDF/UDM or an INOUT/OUT parameter to an external stored procedure.
LOB_RESULT_LOCATOR* xmlBlob
A pointer to the LOB locator that is used to set the XML type return value.

Usage Notes

FNC_GetXMLResultBlob is used to get a result LOB locator that will be used to set the XML return value.

The XML handle xmlHandle is passed as input and a LOB locator xmlBlob is returned from the function. You can then use LOB FNC routines to set the BLOB value using the xmlBlob locator. UTF-8 encoding should be used to write to the BLOB.

FNC_GetXMLResultBlob can only be used with LOB-based XML return values, otherwise you will get an error.