16.20 - FOR UDT.name - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Content Type
Programming Reference
Publication ID
B035-1144-162K
Language
English (United States)
Last Update
2019-05-24

See the ALTER PROCEDURE (External Form) topic “When to Specify Unprotected Mode” in Teradata Vantage™ SQL Data Definition Language Detailed Topics , B035-1184 .

EXECUTE PROTECTED
Change the execution mode for the specified method from unprotected mode to protected mode.
NOT
Change the execution mode for the specified method from protected mode to unprotected mode.
COMPILE
Recompile the code source for the specified method, generate the object code, recreate the .so file, and distribute the file to all nodes of the system.
The existing method object is replaced by the recompiled version.
ONLY
Recompile the method only. When you specify this option, a new dynamic linked library is not distributed to database nodes.
When you load a method onto another platform of a different type, the system marks the method as not valid, and the method must be recompiled. If there are many methods in one database, you can save time by specifying the ONLY option for all recompilations to avoid having to generate and distribute a new library, until the last one is compiled in that database without the ONLY option.

Example: Changing the Protection Mode

The following ALTER METHOD request changes the protection mode for the method named polygon_mbr() from protected to not protected:

    ALTER METHOD polygon_mbr() FOR SYSUDTLIB.polygon
    EXECUTE NOT PROTECTED;

Example: Recompiling a Method Object

The following ALTER METHOD request recompiles the specific method object named SYSUDTLIB.polygon_mbr:

    ALTER SPECIFIC METHOD SYSUDTLIB.polygon_mbr COMPILE;