UDM Parameter List Syntax Elements - Analytics Database - Teradata Vantage
SQL External Routine Programming
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
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™
Introduction to SQL External Routine Programming
Changes and Additions
C/C++ User-Defined Functions
UDF Types
Overall Procedure Synopsis
UDFs that Issue Operating System I/O Calls
UDFs that Implement UDT Functionality
UDFs that Do Not Perform I/O and Do Not Implement UDT Functionality
Related Information
UDF Source Code Development
Source Code Contents
Internal and External Data
I/O
Signal Handling
Standard C Library Functions
Teradata UDF Library Functions
Consequences of Using the exit() System Call
Header Files
Location
SQL_TEXT Definition
Example: Defining SQL_TEXT and Including sqltypes_td.h
C/C++ Function Name
Function Parameters
Parameter List
Compatible Types
Parameter Passing Convention
Function Name Overloading
Characteristics of a Unique Function
Relationship to CREATE FUNCTION Statement
Calling a Function That is Overloaded
Example: Overloaded Function with Distinct Parameter Data Types
Example: Overloaded Function with Different Number of Parameters
Passing Dynamic UDTs as an Alternative to Overloading Function Names
Using TD_ANYTYPE Parameters as an Alternative to Overloading Function Names
Parameter Types in Overloaded Functions
Scalar Function Parameter List
Scalar Function Parameter Style TD_GENERAL Syntax
Scalar Function Parameter Style SQL Syntax
Scalar Function Parameter Syntax Elements
Example: Scalar Function with Parameter Style TD_GENERAL
Example: Scalar Function with Parameter Style SQL
Scalar Function Body
Basic Scalar Function Definition
Example: Basic Scalar Function
Aggregate Function Parameter List
Aggregate Function Parameter Style TD_GENERAL Syntax
Aggregate Function Parameter Style SQL Syntax
Aggregate Function Parameter Syntax Elements
Example: Aggregate Function with Parameter Style TD_GENERAL
Example: Aggregate Function with Parameter Style SQL
Aggregate Function Body
Basic Algorithm of an Aggregate Function
Using a Switch Statement for the Basic Algorithm
Related Information
Window Aggregate Function Parameter List
Window Aggregate Function Parameter Style TD_GENERAL Syntax
Window Aggregate Function Parameter Style SQL Syntax
Window Function Parameter Syntax Elements
FNC_Context_t Fields
Example: Window Aggregate Function with Parameter Style TD_GENERAL
Example: Window Aggregate Function with Parameter Style SQL
Window Aggregate Function Body
Supported Window Types
Unsupported Window Types
Partitioning
Basic Algorithm of a Window Aggregate Function
Usage Notes
Intermediate Aggregate Storage
Function Context Parameter
Using a C Structure to Access the Storage Area
Allocating Storage
Initializing Storage
Saving Intermediate Results
Combining Intermediate Storage Areas
Producing the Final Group Result
Aggregate Cache and Aggregate UDFs
Related Information
Table Function Parameter List
Fixed Result Row Specification
Dynamic Result Row Specification
Parameter Style
Table Function Syntax
Table Function Syntax Elements
Example: Table Function with Fixed Result Row Specification
Example: Table Function with Dynamic Result Row Specification
Constant Mode Table Function Body
Phases of a Constant Mode Table Function
Implementation Guidelines
Design Considerations
Variable Mode Table Function Body
Phases of a Variable Mode Table Function
Implementation Guidelines
Improving Performance with Phase Reductions
Design Considerations
Table Operators
Differences Between Table Functions and Table Operators
Table Operator Basic Structure
Contract Function
C/C++ Table Operator Metadata Mapping
Example: C Table Operator That Retrieves UDT Metadata
C/C++ Table Operator Default Transform Behavior
Handling Multiple Input Streams
Cogroup and Multiple Input Table Operators
Custom Clause
Running Table Operators on a Set of AMPs
Related Information
Returning SQLSTATE Values
C Data Type
SQLSTATE Values
Initial Value
Display Format
Value Returned to Stored Procedures
Example: Returning the SQLSTATE Result Code Value
Related Information
Using Standard C Library Functions
malloc and free
C++ new and delete Operators
Other Operating System Functions
Problems Using System V IPC and POSIX IPC
Installing the Function
CREATE FUNCTION Statement
Default and Temporary Paths
Specifying Source File Locations
Source File Locations for ODBC
Source File Locations for JDBC
Specifying the C/C++ Function Name
Specifying User-Supplied Include Files
Troubleshooting "Arg list too long" and "Argument list too long" Errors
Related Information
Debugging a User-Defined Function
Forcing an SQL Warning Condition
Debugging Using Trace Tables
Overall Procedure
Getting a Trace String
Writing Trace Output to a Trace Table
Example: Debugging a UDF Using a Trace Table
Related Information
Resolving UDF Server Setup Errors for C/C++ UDFs
C/C++ UDF Invocation
C/C++ UDF Invocation Restrictions
C/C++ UDF Invocation Required Privileges
C/C++ UDF Invocation Argument List
Invoking UDFs with TD_ANYTYPE Result Parameters
Using Non-Deterministic C/C++ UDFs as Conditions on an Index
Ordering Input Arguments to Table UDFs
UDF Locations
Overloaded Function Invocation
Calling an Overloaded Function
Calling Overloaded Functions with Period Type Arguments
Example: Function Selection for Numeric Types
Example: Function Selection for Character Types
Example: Function Selection for NULL as a Literal Argument
Protected Mode Function Execution for C/C++ UDFs
Protected Mode Execution Option for C/C++ UDFs
Choosing the Correct Execution Option for a C/C++ UDF
Protected Mode Function Execution for C/C++ UDFs Related Information
C/C++ User-Defined Functions Argument and Result Behavior
Truncation of Character String Arguments and Result
VARCHAR and VARBYTE Result Behavior
C/C++ UDF Behavior When Using NULL as a Literal Argument
Overflow and Numeric Arguments in C/C++ UDFs
Data Type Conversion of Arguments
Compatible Data Type Conversion
Numeric Constants
String Constants
Hexadecimal Constants
Defining Functions that Use LOB Types
Parameter Lists in Functions that Use LOB Types
Accessing the Value of a Large Object
Appending Data to a Large Object Result
Passing LOB Data in the Intermediate Aggregate Storage Area
Type Conversion and Performance
Truncation and Performance
Getting the Length of a LOB
Related Information
Defining Functions that Use UDT Types
Parameter Lists in Functions that Use UDT Types
Accessing the Value of a Distinct UDT
Accessing the Attribute Values of a Structured UDT
Setting the Value of a Distinct UDT Result
Setting the Attribute Values of a Structured UDT Result
Functions That Implement Functionality for a UDT
Functions and Geospatial Data Types
Functions that Use UDT Types Related Information
Defining Functions that Use Period Types
Parameter Lists in Functions that User Period Types
Accessing the Value of a Period Argument
Setting the Value of a Period Result
Functions that Use Period Types Related Information
Defining C/C++ Functions that Use the TD_ANYTYPE Type
Parameter Lists in Functions that Use the TD_ANYTYPE Type
Accessing Information Associated With TD_ANYTYPE Parameters
Using TD_ANYTYPE Parameters in a Routine
The RETURNS and RETURNS STYLE Clauses
Functions that Use TD_ANYTYPE Related Information
Defining Functions that Use ARRAY Types
Parameter Lists in Functions that Use ARRAY Types
Accessing Information about ARRAY Elements
Checking and Setting the NullBitVector
Accessing the Value of Array Elements
Setting the Value of Array Elements
Functions that Use ARRAY Types Related Information
Defining Functions for Algorithmic Compression
Rules for Writing UDFs that Compress Character and Byte Data
Rules for Writing UDFs that Decompress Character and Byte Data
Rules for Writing UDFs that Compress/Decompress TIME, TIMESTAMP, Period, ARRAY, and non-LOB UDT Data
Rules for Writing UDFs that Compress/Decompress LOB Data
Compressing BLOB and CLOB Types
Decompressing BLOB and CLOB Types
Compressing Distinct UDT LOB Types
Decompressing Distinct UDT LOB Types
Algorithmic Compression Function Definition Related Information
Defining Functions for Row Level Security
Row Level Security
Security Constraint UDFs
Rules for Security Constraint UDFs
INSERT UDF Parameter List
UPDATE UDF Parameter List
DELETE UDF Parameter List
SELECT UDF Parameter List
Security Constraint UDF Body
Example: Security Constraint Hierarchical Rules
Example: Security Constraint Non-Hierarchical Rules
Return Values for INSERT or UPDATE UDFs
Return Values for SELECT or DELETE UDFs
General Global Functions
Functions Available at Database Level
Creating General Global Functions
Using the General Global Function in Other UDFs
Installing a Library of General Global Functions
Dropping General Global Functions
C/C++ External Stored Procedures
Overall Development Synopsis
External Stored Procedures That Do Not Perform I/O or Execute SQL
External Stored Procedures that Execute SQL
External Stored Procedures that Issue Operating System I/O Calls and Do Not Execute SQL
Related Information
Source Code Development for C/C++ External Stored Procedures
Source Code Contents
Internal and External Data
I/O
Signal Handling
Standard C Library Functions
Teradata Library Functions
Problems Using System V IPC and POSIX IPC
Consequences of Using the exit() System Call
C/C++ Header Files
Location
SQL_TEXT Definition
Example: Defining SQL_TEXT and Including sqltypes_td.h
SQL Data Types
Including CLIv2 Header Files for External Stored Procedures with SQL
C/C++ Function Name
External Stored Procedure Parameters
Parameter List
Compatible Types
Parameter Passing Convention
External Stored Procedure Parameter List
External Stored Procedure Parameter Style TD_GENERAL Syntax
External Stored Procedure Parameter Style SQL Syntax
External Stored Procedure Parameter List Syntax Elements
Example: Procedure with Parameter Style TD_GENERAL
Example: Procedure with Parameter Style SQL
External Stored Procedure C/C++ Function Body
Basic C/C++ Function Definition
Example: Basic External Stored Procedure
External Stored Procedures That Use CLOB or BLOB Arguments
External Stored Procedures That Use UDT Arguments
External Stored Procedures That Use Period Arguments
External Stored Procedures That Use ARRAY Arguments
External Stored Procedures That Use TD_ANYTYPE Arguments
External Stored Procedures That Use CLIv2 to Directly Execute SQL
Returning SQLSTATE Values
C Data Type
SQLSTATE Values
Initial Value
Display Format
Value Returned to Stored Procedures
Example: Returning the SQLSTATE Result Code Value
Related Information
Calling Stored Procedures From External Stored Procedures
Overall Procedure
Example: Calling a Stored Procedure from an External Stored Procedure
Nested Procedures
Related Information
Executing SQL in C/C++ External Stored Procedures
Overall Procedure
Requesting an 8-byte Activity Count
Creating Result Sets to Return to the Client or Caller
Consuming Result Sets Created by Calling a Stored Procedure
Calling Teradata Library Functions
Effects of Using DBFABT to Abort a Request
Returning Before an Outstanding Request Completes
Calling an External Stored Procedure From a Trigger
Related Information
Installing a C/C++ External Stored Procedure
CREATE PROCEDURE Statement
Default and Temporary Paths
Specifying Source File Locations
Source File Locations for ODBC
Source File Locations for JDBC
Specifying the C/C++ Function Name
Specifying Nonstandard Include Files
Installing External Stored Procedures That Use CLIv2
Related Information
Debugging an External Stored Procedure
Forcing an SQL Warning Condition
Using Trace Tables
Resolving UDF Server Setup Errors
External Stored Procedure Invocation
Argument List
Invoking External Stored Procedures with TD_ANYTYPE OUT Parameters
Nested Procedure Calls
Related Information
Protected Mode Execution
Protected Mode Execution Option
Choosing the Correct Execution Option
Related Information
AT TIME ZONE Option for External Procedures
Argument Behavior
Truncation of Character String Arguments
Behavior When Using NULL as a Literal Argument
Overflow and Numeric Arguments
Data Type for INOUT Constant Arguments
C/C++ User-Defined Methods
UDM Types
Overall Development Synopsis
UDM Source Code Development
Header Files
C/C++ Function Name
UDM Parameters
Method Name Overloading
UDM Parameter List
UDM Parameter List TD_GENERAL Syntax
UDM Parameter List SQL Syntax
UDM Parameter List Syntax Elements
Examples
C/C++ Function Body
Returning SQLSTATE Values
Installing the UDM
Debugging a UDM
Resolving UDF Server Setup Errors
UDM Invocation
Protected Mode Execution
Argument Behavior
Java User-Defined Functions
UDF Types
Java Development Environment
Overall Procedure Synopsis
System Requirements
Procedure
Related Information
UDF Source Code Development
Source Code Contents
Class Fields
Resource Access
Teradata Application Classes
Attempting to Exit the Java Virtual Machine
Compiling the Source Code
Class and Method Names
Parameter List and Return Value
Default Mapping Convention of Parameter Types
Overriding the Default Mapping of Parameters
Default Mapping Convention of Return Value Types
Overriding the Default Mapping of Return Value Types
CLOB and BLOB Type Mapping
UDF Type Determines Additional Parameters
Scalar UDFs
Method Signature for Scalar UDFs
Example: Using Default Mapping of Parameter Types
Example: Overriding Default Parameter Mapping to Handle NULLs
Related Information
Aggregate UDFs
Method Signature for Aggregate UDFs
Basic Algorithm of an Aggregate UDF
Using a Switch Statement for the Basic Algorithm
Related Information
Window Aggregate UDFs
Supported Window Types
Invoking a Window Aggregate UDF
Basic Algorithm of a Window Aggregate UDF
Intermediate Aggregate Storage
Context[] Parameter
Defining What to Store in the Storage Area
Allocating and Initializing Storage
Saving Intermediate Results
Combining Intermediate Storage Areas
Producing the Final Group Result
Aggregate Cache and Aggregate UDFs
Related Information
Table UDFs
Teradata Application Classes
Fixed Result Row Specification
Dynamic Result Row Specification
Method Signature for Table UDFs
Example: Table UDF with Fixed Result Row Specification
Example: Table UDF with Dynamic Result Row Specification
Constant Mode Table UDFs
Phases of a Constant Mode Table UDF
Implementation Guidelines
Design Considerations
Variable Mode Table UDFs
Phases of a Variable Mode Table UDF
Implementation Guidelines
Improving Performance with Phase Reductions
Design Considerations
Table UDFs that Retain Data Between Iterations
Classes that Hold the Data to Retain Between Iterations
Using a Byte Array to Hold Data Between Iterations
Clob and Blob Classes
Example: Table UDF Using Clob to Hold Data in Intermediate Storage
Table Operators
Java Table Operator Metadata Mapping
Example: Java Table Operator With UDT Input and Output Columns
Java Table Operator Default Transform Behavior and Transform Off Format
Getting and Setting the Time Zone in a Java Table Operator
Example: Getting and Setting the Time Zone in a Java Table Operator
Related Information
Exception Handling
Returning SQLSTATE Values
Checking Exceptions Returned From Teradata Application Classes
Handling Exceptions From Java External Routines
Compiling the Source Code
Registering the JAR or ZIP File
Defining the SQL Function
Database for the Function
Specifying the Class Name, Method Name, and JAR or ZIP Identifier
Related Information
Debugging a User-Defined Function
Debugging Outside the Database
Using Trace Tables
Resolving UDF Server Setup Errors
UDF Invocation
Restrictions
Required Privileges
Argument List
Behavior When Using NULL as a Literal Argument
Invoking UDFs with TD_ANYTYPE Result Parameters
Using Non-Deterministic UDFs as Conditions on an Index
Java UDF Execution Environment
Related Information
Function Name Overloading
Characteristics of a Unique Function
Relationship to CREATE FUNCTION Statement
Example: Overloaded Function
Defining Functions that Use the TD_ANYTYPE Type
Example: Function with TD_ANYTYPE Parameter and Return Type
The RETURNS and RETURNS STYLE Clauses
JAR and ZIP File Administration
Using Java Reflection
Procedure
Limitations
Java External Stored Procedures
Java Development Environment
Overall Development Synopsis
Class and Method Names
Parameter List
Usage Notes
Examples
External Stored Procedures That Use TD_ANYTYPE Arguments
Class Fields
Returning SQLSTATE Values
Executing SQL in Java External Stored Procedures
Usage Notes
Examples
Related Information
Returning Dynamic Result Sets
Usage Notes
Example: Returning Two Result Sets
Consuming Result Sets Created by Calling a Stored Procedure
Teradata Application Classes
Compiling the Source Code
Registering the JAR or ZIP File
Defining the SQL External Stored Procedure
Debugging Using Trace Tables
Resolving UDF Server Setup Errors
External Stored Procedure Invocation
AT TIME ZONE Option for External Procedures
Argument Behavior
JAR and ZIP File Administration
Using Java Reflection
Attempting to Exit the Java Virtual Machine
R Table Operators
Installation of R Components and Packages
Using ExecR to Execute R Scripts and Table Operators
Supported Character Sets for R Programs
Memory Limitation
keepLog USING Clause
R Table Operator Example
R Table Operator Example: Echo Example
R Table Operator Use Case: Grouping Using K Means
R FNC Functions
Mapping Between R and C Data Types
Mapping Between Teradata Data Types and R Types
tdr.ampinfo
tdr.BigInt
tdr.Blob
tdr.Byte
tdr.ByteInt
tdr.Char
tdr.Clob
tdr.Close
tdr.Date
tdr.dbsinfo
tdr.Decimal1
tdr.Decimal2
tdr.Decimal4
tdr.Decimal8
tdr.Decimal16
tdr.DisableCoGroup
tdr.Float
tdr.GetAsClauseName
tdr.GetAttributeByNdx
tdr.GetColCount
tdr.GetColDef
tdr.GetContractDef
tdr.GetContractLength
tdr.GetCountHashBy
tdr.GetCountLocalOrderBy
tdr.GetCustomKeyAt
tdr.GetCustomKeyCount
tdr.GetCustomValuesAt
tdr.GetCustomValuesOf
tdr.GetFormat
tdr.GetHashByDef
tdr.GetLobLength
tdr.GetLocalOrderByDef
tdr.getnodedata
tdr.GetStreamCount
tdr.Integer
tdr.IntervalDay
tdr.IntervalDTH
tdr.IntervalDTM
tdr.IntervalDTS
tdr.IntervalHour
tdr.IntervalHTM
tdr.IntervalHTS
tdr.IntervalMinute
tdr.IntervalMonth
tdr.IntervalMTS
tdr.IntervalSecond
tdr.IntervalYear
tdr.IntervalYTM
tdr.IsDimension
tdr.LobAppend
tdr.LobClose
tdr.LobCol2Loc
tdr.LobOpen_CL
tdr.LobRead
tdr.Open
tdr.Read
tdr.Real
tdr.SetAttributeByNdx
tdr.SetContractDef
tdr.SetError
tdr.SetFormat
tdr.SetHashByDef
tdr.SetLocalOrderByDef
tdr.SetOutputColDef
tdr.SmallInt
tdr.TblRead
tdr.TblWrite
tdr.Time
tdr.Timestamp
tdr.TimestampWTZ
tdr.TimeWTZ
tdr.tracestring
tdr.tracewrite
tdr.VarByte
tdr.VarChar
tdr.Write
Global and Persistent Data
GLOP Data
Benefits of GLOP Data
GLOP Mappings
GLOP Set
GLOP Set Membership
GLOP Data Access From an External Routine
GLOP Page
GLOP Types
Persistence of GLOP Types
GLOP Data Attributes
GLOP Data System Tables
GLOP Data System Stored Procedures
Managing GLOP Data
Creating a GLOP Set Definition
Adding Mappings and Data to a GLOP Set
Becoming a Member of a GLOP Set
Using GLOP Data in a C/C++ External Routine
DBCExtension.GLOP_Add Stored Procedure
DBCExtension.GLOP_Remove Stored Procedure
DBCExtension.GLOP_Change Stored Procedure
DBCExtension.GLOP_Report Stored Procedure
System Disk Space
Global Configuration Settings
Administration
System Requirements
Global Configuration Settings
Protected Mode Process and Server Administration for C/C++ External Routines
Server Administration for Java External Routines
Finding Unprotected Mode UDFs and Changing the Execution Mode
File System Cleanup
Registering and Distributing JAR and ZIP Files for Java External Routines
SQLJ.INSTALL_JAR External Stored Procedure
Removing Registered JAR or ZIP Files
SQLJ.REMOVE_JAR External Stored Procedure
Replacing Registered JAR or ZIP Files
SQLJ.REPLACE_JAR External Stored Procedure
Redistributing Registered JAR or ZIP Files
SQLJ.REDISTRIBUTE_JAR External Stored Procedure
Altering the Java Path of Registered JAR or ZIP Files
SQLJ.ALTER_JAVA_PATH External Stored Procedure
Distributing Packages
installsp Stored Procedure
Usage Notes
Example: Distributing a Package
Related Information
Backing Up and Restoring Packages [Deprecated]
savepkg Stored Procedure
loadpkg Stored Procedure
Procedure for Backing Up a Package
Example: Backing Up a Package
Procedure for Restoring a Package
SYSLIB Tables
SYSLIB Space Considerations
Related Information
SQL Data Type Mapping
C Data Types
array_name
BIGINT
BINARY LARGE OBJECT / BLOB
BYTE
BYTEINT
CHARACTER / CHAR
CHARACTER CHARACTER SET GRAPHIC
CHARACTER VARYING / LONG VARCHAR / VARCHAR
CHARACTER LARGE OBJECT / CLOB
DATASET
DATE
DECIMAL / NUMERIC
DOUBLE PRECISION / FLOAT / REAL
Geospatial: MBB, MBR, ST_GEOMETRY
INTEGER
INTERVAL DAY
INTERVAL DAY TO HOUR
INTERVAL DAY TO MINUTE
INTERVAL DAY TO SECOND
INTERVAL HOUR
INTERVAL HOUR TO MINUTE
INTERVAL HOUR TO SECOND
INTERVAL MINUTE
INTERVAL MINUTE TO SECOND
INTERVAL MONTH
INTERVAL SECOND
INTERVAL YEAR
INTERVAL YEAR TO MONTH
JSON
NUMBER
PERIOD (DATE) / PERIOD(TIME) / PERIOD(TIMESTAMP)
SMALLINT
TD_ANYTYPE
TIME
TIME WITH TIME ZONE
TIMESTAMP
TIMESTAMP WITH TIME ZONE
UDT_name / VARIANT_TYPE
VARBYTE
VARCHAR CHARACTER SET GRAPHIC, LONG VARCHAR CHARACTER SET GRAPHIC
XML
Java Data Types
Supported Types
Unsupported Types
C Library Functions
Function Types
FNC Data Structures
DATASET Definitions
Table Operator Data Structures
FNC_AmpInfo
Return Type
Syntax
Usage Notes
Restrictions
Example
FNC_CallSP
Syntax
Usage Notes
Restrictions
Example
FNC_CheckNullBitVector
Syntax
Usage Notes
Example
FNC_CheckNullBitVectorByElemIndex
FNC_CheckNullBitVectorByElemIndex Syntax
Usage Notes
Example
FNC_DbsInfo [Deprecated]
Syntax
Usage Notes
Example
FNC_DbsInfo_EON
Syntax
Example
FNC_DBSSessionAttrInfo
FNC_DefMem
Syntax
Usage Notes
Restrictions
Example
FNC_free
Syntax
Usage Notes
FNC_GeomGetResultWKBBlob
FNC_GeomGetResultWKTClob
FNC_GeomGetWKB
FNC_GeomGetWKBBlob
FNC_GeomGetWKBSize
FNC_GeomGetWKT
FNC_GeomGetWKTClob
FNC_GeomGetWKTSize
FNC_GeomSetWKB
FNC_GeomSetWKBBlob
FNC_GeomSetWKT
FNC_GeomSetWKTClob
FNC_GetAmpHash
FNC_GetAnyTypeParamInfo [Deprecated]
Syntax
Usage Notes
Example
Example
FNC_GetAnyTypeParamInfo_eon
Syntax
Usage Notes
Example
Example
FNC_GetArrayElementCount
Syntax
Usage Notes
Example
FNC_GetArrayElements
Syntax
Usage Notes
Allocating the returnValue Buffer
Restrictions
Example
FNC_GetArrayNumDimensions
Syntax
Usage Notes
Example
FNC_GetArrayTypeInfo [Deprecated]
Syntax
Usage Notes
Example
FNC_GetArrayTypeInfo_EON
Syntax
Usage Notes
FNC_GetByteLength
Syntax
Usage Notes
Example
FNC_GetCharLength
Syntax
Usage Notes
Example
FNC_GetDatasetInfo
Example: FNC_GetDatasetInfo
FNC_GetDatasetInputLob
Example: FNC_GetDatasetInputLob
FNC_GetDatasetResultLob
Example: FNC_GetDatasetResultLob and FNC_SetDatasetLob
FNC_GetDatasetSchema
Example: FNC_GetDatasetSchema
FNC_GetDatasetSchemaLob
Example: FNC_GetDatasetSchemaLob
FNC_GetDistinctInputLob
Syntax
Usage Notes
Restrictions
Example Using FNC_GetDistinctInputLob
FNC_GetDistinctResultLob
Syntax
Usage Notes
Restrictions
Example Using FNC_GetDistinctResultLob
FNC_GetDistinctValue
Syntax
Usage Notes
Restrictions
Example Using FNC_GetDistinctValue
FNC_GetExtendedJSONInfo
FNC_GetGeometryInfo
FNC_Get_GLOP_Map
Syntax
Usage Notes
Related Information
FNC_GetGraphicLength
Syntax
Usage Notes
Example Using FNC_GetGraphicLength
FNC_GetHashAmp
FNC_GetInternalValue
Syntax
Usage Notes
Restrictions
Example of Getting the Value of a Period Type
Example of Getting the Value of a JSON Type
FNC_GetJSONInfo
Syntax
Usage Notes
Example Using FNC_GetJSONInfo
FNC_GetJSONInputLob
FNC_GetJSONResultLob
Syntax
Usage Notes
Example Using FNC_GetJSONResultLob
FNC_GetLobLength
Syntax
Usage Notes
Disk Access
Restrictions
Example Using FNC_GetLobLength
FNC_GetLobLength_CL
Syntax
Usage Notes
Example Using FNC_GetLobLength_CL
FNC_GetOutputBufferSize
Syntax
Usage Notes
Restrictions
FNC_GetPhase
Syntax
Usage Notes
Processing Phase
Restrictions
Example Using FNC_GetPhase
FNC_GetPhaseEx
Syntax
Usage Notes
Processing Phase
Restrictions
Example 1 Using FNC_GetPhaseEx
Example 2 Using FNC_GetPhaseEx
FNC_GetQueryBand
Syntax
Usage Notes
System Routines that Use FNC_GetQueryBand
Restrictions
Example Using FNC_GetQueryBand
FNC_GetQueryBandU
Syntax
Usage Notes
Restrictions
Example Using FNC_GetQueryBandU
FNC_GetQueryBandPairs
Syntax
Usage Notes
System Function that Uses FNC_GetQueryBandPairs
Restrictions
Example Using FNC_GetQueryBandPairs
FNC_GetQueryBandPairsU
Syntax
Example Using FNC_GetQueryBandPairsU
FNC_GetQueryBandValue
Syntax
Usage Notes
System Routines that Use FNC_GetQueryBandValue
Restrictions
Example Using FNC_GetQueryBandValue
FNC_GetQueryBandValueU
Syntax
Example Using FNC_GetQueryBandValueU
FNC_GetStructuredAttribute
Syntax
Usage Notes
Restrictions
Example Using FNC_GetStructuredAttribute
FNC_GetStructuredAttributeByNdx
Syntax
Usage Notes
Getting the Value of a Nested Attribute
Restrictions
Example Using FNC_GetStructuredAttributeByNdx
FNC_GetStructuredAttributeCount
Syntax
Usage Notes
Restrictions
Example Using FNC_GetStructuredAttributeCount
FNC_GetStructuredAttributeInfo [Deprecated]
Syntax
Usage Notes
Restrictions
Example Using FNC_GetStructuredAttributeInfo
FNC_GetStructuredAttributeInfo_EON
Syntax
Usage Notes
Restrictions
FNC_GetStructuredInputLobAttribute
FNC_GetStructuredInputLobAttributeByNdx
FNC_GetStructuredResultLobAttribute
FNC_GetStructuredResultLobAttributeByNdx
FNC_GetUDTHandles
FNC_GetVarCharLength
Syntax
Usage Notes
Example Using FNC_GetVarCharLength
FNC_GetXML
FNC_GetXMLBlob
Example: Using FNC_GetXMLBlob to Retrieve an XML Type Input Value
FNC_GetXMLByte
FNC_GetXMLClob
Example: Using FNC_GetXMLClob to Retrieve an XML Type Input Value
FNC_GetXMLInfo
Example: FNC_GetXMLInfo, FNC_GetXML, and FNC_SetXML
FNC_GetXMLResultBlob
FNC_GetXMLResultClob
FNC_GLOP_Global_Copy
Syntax
Usage Notes
Related Information
FNC_GLOP_Lock
Syntax
Usage Notes
Related Information
FNC_GLOP_Map_Page
Syntax
Usage Notes
Example Using FNC_GLOP_Map_Page
Related Information
FNC_GLOP_Unlock
Syntax
Usage Notes
Related Information
FNC_LobAppend
Syntax
Usage Notes
Restrictions
Example Using FNC_LobAppend
FNC_LobClose
Syntax
Usage Notes
Restrictions
Example Using FNC_LobClose
FNC_LobCol2Loc
Syntax
FNC_LobLoc2Ref
Syntax
Usage Notes
Restrictions
Example Using FNC_LobLoc2Ref
FNC_LobOpen
Syntax
Usage Notes
Restrictions
Example Using FNC_LobOpen
FNC_LobOpen_CL
Syntax
Usage Notes
Example Using FNC_LobOpen_CL
FNC_LobRead
Syntax
Usage Notes
Restrictions
Example Using FNC_LobRead
FNC_LobRef2Loc
Syntax
Usage Notes
Restrictions
Example Using FNC_LobRef2Loc
FNC_MBBGetValue
FNC_MBBSetValue
FNC_MBRGetValue
FNC_MBRSetValue
FNC_malloc
Syntax
Usage Notes
FNC_SetActivityCount
FNC_SetArrayElements
Syntax
Usage Notes
Examples of Setting Element Values for a 1-D Array
Example: Set the Value of the Element in Position 2 of the Array
Example: Set the Value of the Elements in Positions 1-3 of the Array
Example: Set the Value of All Elements in the Array
Examples of Setting Element Values for an n-D Array
Example: Set the Value of the Element in Position [2:2][2:2] of the Array
Example: Set the Value of the Elements in Positions [10:15][10:20] of the Array
FNC_SetArrayElementsWithMultiValues
Syntax
Usage Notes
Allocating the newValues Buffer
Filling the newValues Buffer
Setting the NullBitVector
Example Using FNC_SetArrayElementsWithMultiValues with ARRAY
Example Using FNC_SetArrayElementsWithMultiValues with n-D ARRAY
FNC_SetDatasetLob
Example: FNC_GetDatasetResultLob and FNC_SetDatasetLob
FNC_SetDistinctValue
Syntax
Usage Notes
Restrictions
Example Using FNC_SetDistinctValue
FNC_SetInternalValue
Syntax
Usage Notes
Restrictions
Example of Setting the Value of a Period Type
Example of Setting the Value of a JSON Type
FNC_SetNullBitVector
FNC_SetNullBitVectorByElemIndex
Syntax
Usage Notes
Example Using FNC_SetNullBitVectorByElemIndex
FNC_SetStructuredAttribute
FNC_SetStructuredAttributeByNdx
FNC_SetVarCharLength
FNC_SetXML
Example: FNC_SetXML
FNC_SetXMLBlob
Example: FNC_GetXMLResultBlob and FNC_SetXMLBlob
FNC_SetXMLByte
Example: FNC_GetXMLByte and FNC_SetXMLByte
FNC_SetXMLClob
Example: FNC_GetXMLResultClob and FNC_SetXMLClob
FNC_TblAbort
FNC_TblAllocCtrlCtx
FNC_TblAllocCtx
FNC_TblControl
FNC_TblFirstParticipant
Syntax
Usage Notes
Example Using FNC_TblFirstParticipant
FNC_TblGetColDef
Syntax
Usage Notes
Example Using FNC_TblGetColDef
Related Information
FNC_TblGetCtrlCtx
Syntax
Usage Notes
Example Using FNC_TblGetCtrlCtx
FNC_TblGetCtx
Syntax
Usage Notes
Example Using FNC_TblGetCtx
FNC_TblGetNodeData
Syntax
Return Type
Usage Notes
Example Using FNC_TblGetNodeData
FNC_TblOpBindAttributeByNdx
Syntax
Usage Notes
Example Using FNC_TblOpBindAttributeByNdx
FNC_TblOpBytesTransferred
FNC_TblOpClose
Syntax
Usage Notes
Example Using FNC_TblOpClose
FNC_TblOpDisableCoGroup
Syntax
Usage Notes
FNC_TblOpGetAsClauseName
Syntax
Usage Notes
FNC_TblOpGetAttributeByNdx
Syntax
Example Using FNC_TblOpGetAttributeByNdx
FNC_TblOpGetBaseInfo
Example: FNC_TblOpGetBaseInfo
FNC_TblOpGetColCount
Syntax
FNC_TblOpGetColDef
Syntax
Usage Notes
Example Using FNC_TblOpGetColDef
FNC_TblOpGetContractDef
Syntax
Usage Notes
FNC_TblOpGetContractLength
Syntax
FNC_TblOpGetContractPhase
FNC_TblOpGetCountHashByDef
Syntax
FNC_TblOpGetCountLocalOrderByDef
Syntax
FNC_TblOpGetCustomKeyCount
Syntax
Example Using FNC_TblOpGetCustomKeyCount
Related Information
FNC_TblOpGetCustomKeyInfoAt
Syntax
Usage Notes
Related Information
FNC_TblOpGetCustomKeyInfoOf
Syntax
Usage Notes
Related Information
FNC_TblOpGetCustomValuesOf
FNC_TblOpGetExternalQuery
FNC_TblOpGetFormat
FNC_TblOpGetFunctionDef
FNC_TblOpGetHashByDef
FNC_TblOpGetInnerContract
FNC_TblOpGetLocalOrderByDef
FNC_TblOpGetStreamCount
FNC_TblOpGetStructuredAttributeInfo
Example: FNC_TblOpGetUDTMetadata and FNC_TblOpGetStructuredAttributeInfo
FNC_TblOpGetUDTMetadata
Example: FNC_TblOpGetUDTMetadata and FNC_TblOpGetStructuredAttributeInfo
FNC_TblOpGetUniqID
FNC_TblOpIsDimension
FNC_TblOpOpen
FNC_TblOpRead
FNC_TblOpReadBuf
FNC_TblOpReadBufEx
FNC_TblOpSetContractDef
FNC_TblOpSetDisplayLength
FNC_TblOpSetError
FNC_TblOpSetExplainText
FNC_TblOpSetFormat
FNC_TblOpSetHashByDef
FNC_TblOpSetInputColTypes
FNC_TblOpSetLocalOrderByDef
FNC_TblOpSetOutputColDef
FNC_TblOpWrite
FNC_TblOpWriteBuf
FNC_TblOptOut
FNC_Trace_String
FNC_Trace_Write
FNC_Trace_Write_DL
FNC_UdtDeserialize
FNC_UdtGetSerializeSize
FNC_UdtSerialize
FNC_UdtSerializeSupported
FNC_Where_Am_I
Java Application Classes
Class Path
com.teradata.fnc.AMPInfo
AMPInfo Constructor
getNodeId()
getAMPId()
lowestAMPOnNode()
com.teradata.fnc.Array
free()
getArray()
getArray(Map)
getArray(long, int)
getArray(long, int, Map)
getBaseType()
getBaseTypeName()
getNumDimensions()
getResultSet()
getResultSet(Map)
getResultSet(long,int)
getResultSet(long, int, Map)
getResultSet_nD()
getResultSet_nD(List<Integer>, List<Integer>)
getUDFOutputArray()
getXSPInoutArrayForNull(int)
setArray(Object, long, int)
setArray_nD(Object, List<Integer>, List<Integer>)
setResultSet(ResultSet)
setResultSet_nD(ResultSet)
Examples: Using java.sql.Array Interface For ARRAY Parameter
com.teradata.fnc.Blob
Syntax
free()
getBinaryStream()
getBinaryStream(long pos, long length)
getBytes(long pos, int length)
getUDFOutputBlob()
getXSPInoutBlobForNull(int index)
length()
position(byte[] pattern, long start)
position(java.sql.Blob pattern, long start)
setBinaryStream(long pos)
setBytes(long pos, byte[] bytes)
setBytes(long pos, byte[] bytes, int offset, int len)
truncate(long len)
com.teradata.fnc.Clob
Syntax
free()
getAsciiStream()
getCharacterStream()
getCharacterStream(long pos, long length)
getSubString(long pos, int length)
getUDFOutputClob()
getXSPInoutClobForNull(int index)
length()
position(java.lang.String searchstr, long start)
position(java.sql.Clob searchClob, long start)
setAsciiStream(long pos)
setCharacterStream(long pos)
setString(long pos, java.lang.String str)
setString(long pos, java.lang.String str, int offset, int len)
truncate(long len)
com.teradata.fnc.Context
Syntax
getVersion()
getFlags()
getObject(int objNum)
setObject(int objNum, java.lang.Object obj)
initCtx(java.lang.Object obj)
getGroupCount()
getWindowSize()
getPreWindow()
getPostWindow()
initCtx(int length)
getBytes(int objNum)
setBytes(int objNum, byte[] data)
com.teradata.fnc.DbsInfo
Syntax
getUserAccount() [Deprecated]
getUserAccount_EON()
getUserName() [Deprecated]
getUserName_EON()
getUserId()
getStatementNo()
getHost()
getSessionNo()
getRequestNo()
getTraceString()
traceWrite(java.lang.Object[] argv)
com.teradata.fnc.NodeInfo
Syntax
NodeInfo Constructor
getNumAMPNodes()
getNumAMPs()
getNodeIds()
getAMPIds()
com.teradata.fnc.Operator
Syntax
getResultSet
read
write
com.teradata.fnc.operator.MetaData
getJSONFormat(int)
getPeriodType(int)
getTeradataColumnType(int)
getUdtTypeName(int)
com.teradata.fnc.Phase
Syntax
getPhase()
com.teradata.fnc.QueryBand
Syntax
getQueryBand(), getQueryBand(int BufSize)
getQueryBandLen(int BufSize)
getQueryBandPairs(String QBandBuf, int QB_SearchType)
getQueryBandNumPairs(String QBandBuf, int QB_SearchType)
getQueryBandValue(String QBandBuf, int QB_SearchType, String QBName)
com.teradata.fnc.Runtime
com.teradata.fnc.Runtime Classes
com.teradata.fnc.Runtime Enums
Class ArrayTypeInfo
ArrayTypeInfo Methods
Class ColumnDefinition
ColumnDefinition Constructors
ColumnDefinition Methods
getCharset()
getDisplayLength()
getJsonFormat()
getName()
getPeriodType()
getPrecision()
getScale()
getType()
getUDTName()
isTimeZone()
setCharset(int)
setDisplayLength(int)
setJsonFormat(byte)
setPeriodType(int)
setPrecision(int)
setScale(int)
setTimeZone(boolean)
setUDTName(String)
Class InputInfo
InputInfo Methods
getAsName(int)
getCustom()
getFormat(int, InputInfo.StreamDir)
getFunctionInfo()
getHashBy(int)
getIncount()
getisDimension(int)
getOrderBy(int)
getOutcount()
getUDTMetadata(int)
Enum InputInfo.StreamDir
Enum InputInfo.StreamDir Constants
Enum InputInfo.StreamDir Methods
getStreamFormat
valueOf
values
Class RuntimeContract
RuntimeContract Methods
bytesTransferred
complete
disableCoGroup
getAmpHash
getBaseInfo
getContractCtx
getContractObject
getContractPhase
getDBSSessionAttrInfo
getExternalQuery
getHashAmp
getInnerContractCtx
getInputInfo
getUniqTblOpID
setActivityCount
setContractCtx
setContractCtx
setDisplayLength
setExplainText
setFormat
setHashBy
setInputInfo
setOrderBy
setOutputInfo
Class StreamFormat
StreamFormat Constructor
StreamFormat Methods
getAttributeMap
Enum StreamFormat.FormatAttribute
Enum StreamFormat.FormatAttribute Constants
Enum StreamFormat.FormatAttribute Methods
getFormatAttribute
size
valueOf
values
Enum StreamFormat.StreamFmt
Enum StreamFormat.StreamFmt Constants
Enum StreamFormat.StreamFmt Methods
getStreamFormat
valueOf
values
Class UDTBaseInfo
UDTBaseInfo Methods
getArrayInfo()
getArrayNumDimension()
getBaseCharset()
getBaseDataType()
getBaseMaxLength()
getBaseNumFractionalDigits()
getBasePrecision()
getBaseTotalIntervalDigits()
getJSONStorageFormat()
getStructNumAttributes()
getTransform Methods
getUdtIndicator()
getUdtName()
setArrayInfo(ArrayTypeInfo)
setArrayNumDimension(int)
setBaseCharset(int)
setBaseDataType(TeradataType)
setBaseMaxLength(int)
setBaseNumFractionalDigits(short)
setBasePrecision(int)
setBaseTotalIntervalDigits(short)
setJSONStorageFormat(short)
setStructNumAttributes(int)
setTransform Methods
setUdtIndicator(short)
setUdtName(java.lang.String)
com.teradata.fnc.SQLXML
free()
getBinaryStream()
getCharacterStream()
getString()
getUDFOutputSQLXML()
getXSPInoutSQLXMLForNull(int)
setBinaryStream()
setCharacterStream()
setString(String)
Example: Using the com.teradata.fnc.SQLXML Class For an IN and OUT XML Parameter
com.teradata.fnc.ST_Geometry
getSRID()
getUDFOutputGeometry()
getWKB()
getWKBSize()
getWKT()
getWKTSize()
getXSPInoutGeometryForNull()
setSRID()
setWKB()
setWKT()
Example: Using the com.teradata.fnc.ST_Geometry Class For an IN and OUT ST_Geometry Parameter
com.teradata.fnc.Struct
getAttributes()
getAttributes(Map)
getSQLTypeName()
getXSPInoutStructForNull(int)
Example: Using the java.sql.Struct Interface for a Structured UDT Parameter
com.teradata.fnc.TeradataType
enum TeradataType
get(int)
com.teradata.fnc.Tbl
Syntax
Tbl Constructor
getMode()
getPhase(int[] phase)
getPhaseEx(int[] phase, int option)
allocCtx(java.lang.Object tblCtxObj)
allocCtx(int size)
control()
getColDef()
getLength(int index)
getPrecision(int index)
getScale(int index)
optOut()
abort()
firstParticipant()
setCtrlCtx(java.lang.Object tblCtrlCtx)
getCtrlCtx()
setCtxObject(java.lang.Object tblCtxObj)
setCtxObject(byte[] ctxByteArr)
getCtxObject()
getCtxObject(byte[] ctxByteArr)
com.teradata.fnc.value.TeradataTime
Syntax
TeradataTime(long time)
setTimeZone(TimeZone tz)
getTimeZone()
com.teradata.fnc.value.TeradataTimestamp
Syntax
TeradataTimestamp(long time)
setTimeZone(TimeZone tz)
getTimeZone()
com.teradata.fnc.TraceObj
Syntax
TraceObj Constructor
getTraceObjObject()
getTraceObjectJavaTypeID()
getTraceObjectTraceTypeID()
Related Information
UDF Code Examples
C Scalar Function
SQL Definition
Example Query: C Scalar Function
C Function Definition
C Scalar Function Using LOBs
SQL Definition
C Function Definition
C Scalar Function Using TD_ANYTYPE Parameters
SQL Definition
Example Query: C Scalar Function Using TD_ANYTYPE Parameters
C Function Definition
C Scalar Functions for UDT Functionality
SQL Definition
Example Query: C Scalar Functions for UDT Functionality
C Function Definition
C Scalar Function Using Dynamic UDTs
SQL Definition
Example Query: C Scalar Function Using Dynamic UDTs
C Function Definition
C Scalar Function for Compressing CLOB Data
SQL Definition
Example Table Definition
C Function Definition
C Scalar Function for Decompressing CLOB Data
SQL Definition
Example Table Definition
C Function Definition
C Scalar Function for Compressing Distinct UDT LOB Types
SQL Definition
Example Table Definition
C Function Definition
C Scalar Function for Decompressing Distinct UDT LOB Types
SQL Definition
Example Table Definition
C Function Definition
C Scalar Functions for Row Level Security
Security Constraint Object Definition
SQL Function Definition
C Function Definition
C Aggregate Function
SQL Definition
Example Query: C Aggregate Function
C Function Definition
C Aggregate Function Using LOBs
SQL Definition
C Function Definition
C Aggregate Function Using TD_ANYTYPE Parameters
SQL Definition
Example Query
C Function Definition
C Aggregate Function Using UDTs
SQL Definition
Example Query
C Function Definition
C Window Aggregate Function
SQL Definition
Example Query
C Function Definition
C Table Function
SQL Definition
Example Query
C Function Definition
Example Output
C Constant/Variable Mode Table Function
SQL Definition
Example Query
C Function Definition
C Constant/Variable Mode Table Function With Dynamic Result Row Specification
SQL Definition
Example Query
C Function Definition
C Table Operator
SQL Definition
Example Query
C Function Definition for the Contract Function
C Function Definition for the Table Operator
C Function Using GLOP Data
SQL Statement to Create GLOP Set
Add Data to GLOP Set
SQL Definition for the Function That Generates GLOP Data
SQL Definition for the Function That Uses GLOP Data
Example Query That Calls the UDF That Uses the GLOP Data
C Function Definition That Generates GLOP Data
C Function Definition That Uses GLOP Data
Java Scalar Function
JAR File Registration
SQL Definition
Example Query
Java Method Implementation
Java Function Using TD_ANYTYPE Parameters
SQL Definition
Java Implementation
Java Aggregate Function: Arithmetic Sum
JAR File Registration
SQL Definition
Example Query
Java Method Implementation
Java Aggregate Function: Standard Deviation
JAR File Registration
SQL Definition
Example Query
Java Implementation
Java Window Aggregate Function
SQL Definition
Example Query
Java Implementation
Java Constant/Variable Mode Table Function
JAR File Registration
SQL Definition
Example Query
Java Implementation
Java Table Operator
JAR File Registration
SQL Definition
Example Query
Java Method Implementation
External Stored Procedure Code Examples
Simple External Stored Procedure
SQL Definition
Sample Query
C Function Definition
Calling a Stored Procedure Using FNC_CallSP
SQL Definition of the External Stored Procedure
Sample Query
C Function Definition
Sending Mail
SQL Definition
Sample Query
C Function Definition
Using CLIv2 to Execute SQL
SQL Definition
Sample Query
C Function Definition
Using CLIv2 to Consume Dynamic Result Sets
SQL Definition for the External Stored Procedure
Sample Query
C Function Definition
Executing SQL in Java External Stored Procedures
JAR File Registration
SQL Definition for the External Stored Procedure
Sample Query
Java Method Implementation
Example: Java External Stored Procedure With a Period Parameter
UDM Code Examples
Instance Method for a Distinct Type
SQL Definition
Sample Query
C Function Definition
Related Information
Cast Method for a Distinct Type
SQL Definition
Sample Query
C Function Definition
Related Information
Methods for Structured Type
SQL Definition of the UDT
SQL Definition for the Constructor Method
SQL Definitions for the Transform Method
SQL Definitions for the Ordering Method
SQL Definitions for the Cast Method
Sample Queries
C Function Definition for the Constructor Method
C Function Definition for the Ordering Method
C Function Definition for the Transform Method
C Function Definition for the Cast Method
Dropping the Objects Created in this Example
C/C++ Command-line Debugging for UDFs
Benefits of Teradata C/C++ UDF Debugger
Teradata C/C++ UDF Debugger Capabilities
Recommended Test Environment
Restrictions
Simple Debugging Example
Parallel Debugging Example
Differences Between Standard GDB and Teradata C/C++ UDF Debugger Commands
Teradata Commands for UDF Debugging
attach udf
context
delete watchpoint
hold
info context
info held
info map
info scope
info udf
info watch
join
scope
unhold
watch
Procedure to Enable R Functionality with ExecR
Determining the Running Analytics Database Version
Checking if the udfGPL Package is Installed
Downloading the udfGPL Package
Installing the udfGPL Library
Installing Packages Using PUT or the rpm Tool
Creating the ExecR System Table Operator
Configuring the udfGPL Server Memory Limit
Additional Information
Teradata Links
method_name
Pointer to a C string whose value is the method name in the CREATE TYPE definition.
The UDT can use this name to build error messages.
udthandle
Handle of the UDT on which the UDM is invoked, also called the subject parameter .
input_parameter_specification
[Optional] Type and name of an input parameter in the CREATE TYPE definition. Each input parameter in the definition must have a corresponding input_parameter_specification . The maximum number of input parameters is 128.
The type is the C type in sqltypes_td.h that corresponds to the SQL data type of input_parameter .
result
Pointer to a data area big enough to hold the result that the UDT returns, as defined by the RETURNS clause in the corresponding CREATE TYPE statement.
indicator_parameter_specification
[Optional] Indicator parameter corresponding to an input parameter. Each input_parameter_specification must have a corresponding indicator_parameter_specification . The input parameters and indicator parameters must be in the same order.
If the value of indicator_parameter is -1, the value of the corresponding input_parameter is null.
If the value of indicator_parameter is 0, the value of the corresponding input_parameter is a non-null value.
indicator_result
Result indicator parameter corresponding to the result.
sqlstate
Pointer to a six-character C string that indicates the SQLSTATE value—success, exception, or warning. The first five characters are ASCII and the sixth is the C null character. The string is initialized to '00000', which indicates success.
For more information on SQLSTATE values, see Returning SQLSTATE Values .
m
Number of characters in the method name in the CREATE TYPE definition. The ANSI SQL standard defines the maximum value for m as 128. Vantage allows a maximum of 30 characters for a method name.
specific_method_name
Pointer to a C string whose value is the name of the external method being invoked.
If the CREATE TYPE statement includes the SPECIFIC clause, specific_method_name is the name in the SPECIFIC clause; otherwise, specific_method_name is the same as method_name .
The UDT can use this name to build error messages.
l
Number of characters in the name of the external method. The ANSI SQL standard defines the maximum value for m as 128. Vantage allows a maximum of 30 characters for a method name.
error_message
Pointer to a C string whose value is the the error message text.
p
Number of characters in the error message text. The maximum value is 256.