method_specification - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™
INSTANCE
The method signature being defined is an instance method.
This is the default.
CONSTRUCTOR
The method signature being defined is a constructor method.
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.
For information about naming database objects, see Teradata Vantage™ - SQL Fundamentals, B035-1141.
AS LOCATOR
Specifies that a BLOB or CLOB parameter type is represented by a locator. For a description of locators, see Teradata Vantage™ - SQL Data Manipulation Language, B035-1146. LOB parameters must always be represented by a locator. Vantage does not support in-memory LOB parameters: an AS LOCATOR phrase must be specified for each LOB parameter and return value.
Whenever a LOB that requires data type conversion is passed to a method, the LOB must be materialized for the conversion to take place.
CAST FROM
The result type returned by the external function that is to be converted to the type specified by the RETURNS clause. Example:
...RETURNS DECIMAL(9,5) CAST FROM FLOAT...
data_type
Whenever a LOB that requires data type conversion is passed to a method, the LOB must first be materialized for the conversion to take place.
UDT_name
Name of the UDT.
specific_method_name
Specific name of the method whose signature is being added to the type definition for UDT_name.
SELF AS RESULT
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.