Before you call FNC_LobRead to access the value of a large object, you must call FNC_LobOpen to establish a read context.
For best performance of a UDF, UDM, or external stored procedure that is not designed to read an entire object, use the start and maxlength arguments to specify a subset of the object. If the object is on a remote AMP, it saves the cost of moving unneeded data.
Calling FNC_LobOpen increases the number of outstanding read contexts by one.
|IF the UDF or external stored procedure result type is …||THEN the maximum number of outstanding read contexts is …|
|a large object||3|
|not a large object||4|
The LOB_LOCATOR 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 LOCATOR argument to LOB access function in UDF database_name.udf_name.
Control does not return to the UDF, UDM, or external stored procedure.