15.00 - TD_LZ_DECOMPRESS - Teradata Database

Teradata Database SQL Functions, Operators, Expressions, and Predicates

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1145-015K
Language
English (United States)

TD_LZ_DECOMPRESS

Purpose  

Uncompresses data that was compressed using the TD_LZ_COMPRESS function.

Syntax  

where:

 

Syntax element…

Specifies…

TD_SYSFNLIB

the name of the database where the function is located.

expression

data that was compressed using the TD_LZ_COMPRESS function, represented as VARBYTE, BLOB, or a combination of the two.

This function takes no arguments when used as part of the COMPRESS USING or DECOMPRESS USING phrases. For more information about the COMPRESS/DECOMPRESS phrase, see SQL Data Types and Literals.

ANSI Compliance

This is a Teradata extension to the ANSI SQL:2011 standard.

Argument Type and Rules

Expressions passed to this function must have the same data type as those of the corresponding compress function, TD_LZ_COMPRESS. The input should be of type VARBYTE, BLOB, or a combination of the two.

Result Type

The result data type always matches the ALC-allowable data types.

Usage Notes

TD_LZ_DECOMPRESS is normally used with ALC to uncompress table columns previously compressed with TD_LZ_COMPRESS.

Calling the function directly requires using the RETURNS clause to specify the desired result data type. Calling the function directly is not recommended for large data types, such as LOBs.

For an example of the use of a RETURN clause to return a specified data type, see TD_ANYTYPE data type in “Parameter Data Types” in SQL Data Types and Literals.

See http://zlib.net for information about the decompression algorithm used by TD_LZ_DECOMPRESS.

For more information about ALC, see “COMPRESS and DECOMPRESS Phrases” in SQL Data Types and Literals.