RENAME FUNCTION (External Form) and Algorithmic Compression - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

A RENAME FUNCTION request for a function is only valid if the function is not used by any column across all databases and users for compressing and decompressing its data. This restriction is in place because the column is already compressed using a certain algorithm having stored context and cannot be decompressed if the algorithm name is changed.

Consider the following example. Assume that the algorithmic compression and decompression functions and the table that uses them are created in the order indicated.

     CREATE FUNCTION scsu_comp …;

     CREATE FUNCTION scsu_decomp …;

     CREATE TABLE t1 (
       col1 INTEGER,
       col2 CHAR(10) COMPRESS ('abc', 'efg')
                     COMPRESS USING scsu_comp
                     DECOMPRESS USING scsu_decomp);

Column col2 in table t1 references the algorithmic compression-related UDFs scsu_comp and scsu_decomp for compression and decompression respectively.

After having created table t1, a RENAME FUNCTION request on either scsu_comp or scsu_decomp returns an error to the requestor.