Handling Character Sets | CREATE TYPE | Teradata Vantage - Handling Character Sets - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

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
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

If a predefined data type is defined as the character type for an attribute, you can also specify a CHARACTER SET clause to associate a character set with the attribute. If you do not specify a character set, then the system stores the character set that was in effect at the time the UDT was created in DBC.TVFields as the character set for the character attribute.

If the UDF library for your database contains any objects with multibyte characters in their name, you cannot use a single-byte session character set to create a new UDF, UDT, method, or Java external procedure object even if the new object name contains only single-byte characters. Otherwise, the database aborts the request and returns an error to the requestor. Instead, use a multibyte session character set.

When a character attribute is manipulated by either an observer or mutator method, the character set associated with that attribute type must be one of the following:
  • The character set that was declared for that attribute in the CREATE TYPE statement that created the structured UDT.
  • The character set that was in effect at the time that the CREATE TYPE statement was executed.

Collation information is not stored with the character type, so the collation that is in effect is always the effective collation sequence at the time the UDT is accessed.

The CHARACTER SET clause influences the auto-generated routines. An explicitly specified CHARACTER SET clause registers the auto-generated:
  • Observer method to return a character type value of the specified character set.
  • Mutator method to pass in a character parameter type of the specified character set.

The CHARACTER SET clause is the only clause supported as an attribute for a predefined data type. The system does not support column attributes such as CASESPECIFIC. The default case sensitivity that is in effect at the time that the attribute is accessed (at the time the autogenerated routine is invoked) is the effective case sensitivity.