FNC_UdtSerialize Function | C Library Functions | Teradata Vantage - FNC_UdtSerialize - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

Returns the UDT in its serialized format and 0 if the operation was successful, -1 otherwise.

Syntax

int
FNC_UdtSerialize (UDT_HANDLE        udt,
                  BYTE             *buffer,
                  FNC_LobLength_t   num_bytes,
                  FNC_LobLength_t  *actual_length)

Syntax Elements

udt
the handle of the UDT.
buffer
User-allocated buffer to contain the serialized data.
num_bytes
the number of bytes to read.
actual_length
the actual number of bytes that were written to the buffer.

Usage Notes

Before calling this function, do the following:

  1. Call FNC_UdtGetSerializeSize to get the size of the UDT in its serialized form.
  2. Use the size returned by FNC_UdtGetSerializeSize to allocate a buffer to hold the serialized data. The size of the buffer must be large enough to hold all of the serialized data, which must be read in a single call to FNC_UdtSerialize.
  3. Pass this buffer to FNC_UdtSerialize.

The query fails if the UDT does not support serialize/deserialize.