Catalog Functions - ODBC Driver for Teradata

ODBC Driver for Teradata User Guide

Product
ODBC Driver for Teradata
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-07-11
dita:mapPath
smj1488824663219.ditamap
dita:ditavalPath
Audience_PDF_product_legacy_odbc_include.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities

UDFs and UDMs are visible through ODBC Catalog functions as shown in the following table. To get the meta data, the ODBC client application calls the referenced catalog function and looks at the result set:

UDT and UDM Catalog Functions 
Catalog Function Description
SQLTables Returns the value “TYPE” in the TABLE_TYPE column for user-defined types. The type name is returned in the TABLE_NAME column.
SQLColumns Returns the value SQL_UNKNOWN_TYPE (zero) in the DATA_TYPE for a UDT column. The UDT name is returned in the TYPE_NAME column.
SQLProcedures Returns names of user-defined methods in addition to names of macros, procedures, and user-defined functions.

The value of the PROCEDURE_TYPE column for a user-defined method is SQL_PT_PROCEDURE.

SQLProcedureColumns Returns parameter information for user-defined methods. Also, parameter types might be UDTs and these are returned as for the SQLColumns catalog function (SQL_UNKNOWN_TYPE in DATA_TYPE column and UDT name in TYPE_NAME column).

The output for TD_ANYTYPE parameters results in the value SQL_UNKNOWN_TYPE in the DATA_TYPE column and the string “TD_ANYTYPE” (without quotes) in the TYPE_NAME column.