Usage Notes - 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ā„¢

Use FNC_LobClose when the maximum number of outstanding read contexts has been reached and a UDF, UDM, or external stored procedure must access another large object.

You can use FNC_LobClose regardless of whether the end of data was previously reached. However, for best performance when a UDF, UDM, or external stored procedure does not intend to read an object all the way to the end, use the maxlength argument of FNC_LobOpen to access a subset of the object.

When a UDF, UDM, or external stored procedure returns normally, Vantage implicitly closes all outstanding read contexts.

The LOB_CONTEXT_ID argument is validated to the extent possible. If the argument is not valid, the request that invoked the UDF, UDM, or external stored procedure fails and typically returns an error that looks like this:

7554 Invalid CONTEXT_ID argument to LOB access function in
UDF  database_name.udf_name.

Control does not return to the UDF, UDM, or external stored procedure.