Parameter Types in Overloaded Functions | External Routine Programming | Vantage - Parameter Types in Overloaded Functions - 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ā„¢

If you overload function names, and the functions pass the same number of parameters, you must define the functions so that the parameter data types are distinct from each other. Use the following table to help you identify data types that are distinct from each other.

Types Rules
Numeric The following numeric types are distinct from each other, and from other data types:
  • BYTEINT
  • SMALLINT
  • INTEGER
  • BIGINT
  • DECIMAL/NUMERIC
  • NUMBER
  • REAL/FLOAT/DOUBLE PRECISION

DECIMAL, NUMERIC, or NUMBER types that differ in size are not distinct. For example, DECIMAL(6,2) and DECIMAL(8,3) are not distinct.

DateTime The following DateTime types are distinct from each other, and from other data types:
  • DATE
  • TIME
  • TIMESTAMP
  • TIME WITH TIME ZONE
  • TIMESTAMP WITH TIME ZONE
  • All INTERVAL types

TIME, TIMESTAMP, and INTERVAL types that differ in precision or fractional seconds precision are not distinct. For example, TIME(2) and TIME(6) are not distinct.

Character The following character types are distinct from each other, and from other data types:
  • VARCHAR/CHAR VARYING/LONG VARCHAR
  • CHAR
  • CLOB

Character strings that differ in length are not distinct. For example, CHAR(10) and CHAR(5) are not distinct.

Character strings that specify different server character sets in the CHARACTER SET phrase are not distinct.

Byte The following byte types are distinct from each other, and from other data types:
  • BYTE
  • VARBYTE
  • BLOB
Graphic The following graphic types are distinct from each other, and from other data types:
  • CHARACTER CHARACTER SET GRAPHIC
  • VARCHAR CHARACTER SET GRAPHIC or

    LONG VARCHAR CHARACTER SET GRAPHIC

UDT UDTs are distinct from other data types, including other UDTs.
Period The following period types are distinct from each other, and from other data types:
  • PERIOD(DATE)
  • PERIOD(TIME(n))
  • PERIOD(TIME(n) WITH TIME ZONE)
  • PERIOD(TIMESTAMP(n))
  • PERIOD(TIMESTAMP(n) WITH TIME ZONE)

PERIOD(TIME(n)), PERIOD(TIME(n) WITH TIME ZONE), PERIOD(TIMESTAMP(n)), and PERIOD(TIMESTAMP(n) WITH TIME ZONE) types that differ in fractional seconds precision are not distinct. For example, PERIOD(TIME(2)) and PERIOD(TIME(6)) are not distinct.

The types that are separated by a slash ( / ), such as DECIMAL/NUMERIC, are synonyms and are not distinct from each other.