17.10 - method_specification - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)
INSTANCE
The method signature being defined is an instance method.
This is the default.
SYSUDTLIB
An optional keyword that indicates that method_name is being created in the SYSUDTLIB database.
All methods must be created within the SYSUDTLIB database.
method_name
Name for the method whose signature being added to the type definition for UDT_name.
CAST FROM
The result predefined data type returned by the external function that is to be converted to the type specified by the RETURNS clause.

For example:

...RETURNS DECIMAL(9,5) CAST FROM FLOAT...
You cannot specify a character server data set of KANJI1. Otherwise, the system returns an error to the requestor.
Whenever a LOB that requires data type conversion is passed to a method, the LOB must first be materialized for the conversion to occur.
specific_method_name
Specific name of the method whose signature is being added to the type definition for UDT_name. Optionally, you can specify containing database name, which is SYSUDTLIB.
SELF AS RESULT
Specifies that the method is type-preserving.
If you specify SELF AS RESULT, then the data type specified in the RETURNS clause for the method must have the same name as UDT_name.