About Object Names - Teradata Database

International Character Set Support

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-1125
lifecycle
previous
Product Category
Teradata® Database

Object names are always stored in the data dictionary in UNICODE. Specification of object names is subject to these character usage rules:

  • The rules are based on Object Naming Controls, which define allowable characters.
  • You can specify an object name as a regular identifier, that is, without quotation mark delimiters, if the name uses only characters in the current character repertoire.
  • You can specify an object name as a delimited identifier, using characters outside the current character repertoire, by enclosing the name in quotations marks.
  • Certain characters are explicitly disallowed from appearing in object names.
  •  

    For information on...

    See...

    Detailed considerations for object naming, including strategies for using the DBS Control fields that determine object naming rules

    SQL Fundamentals

    Setting DBS Control object naming control.

    Utilities

    The system determines the characters available for use in object names based on the rules determined by the settings of DBS Control object naming control fields.

    Object naming controls determine several naming parameters including available character repertoire and name length.

    Optional name validation rules can impose additional character restrictions.

    Note: Changing object naming control settings only affects objects that are created after the setting change.

    The following summarizes object naming rules.

     

    Parameter

    Description

    Object name length

    A maximum of 128 characters when expressed in UNICODE normalization form D.

    The DBS Control NameValidationRule field can be used to apply additional character restrictions.

    Characters allowed in object names not enclosed in quotation marks

    An object name not enclosed in quotation marks must be composed of an identifier-start character followed by a sequence of identifier-start or identifier extend characters, up to the maximum object name length limit.

    Note: Characters in object names not enclosed in quotation marks must also be in the session character set.

    Identifier start characters must be contained in the session character set and belong to one of the following Unicode General Category classes:

  • Upper-case letters [Lu]
  • Lower-case letters [Ll]
  • Title-case letters [Lt]
  • Modifier letters [Lm]
  • Other letters ([Lo]
  • Letter numbers [Nl]
  • ...Or be one of the following characters:

  • NUMBER SIGN (U+0023)
  • DOLLAR SIGN (U+0024)
  • LOW LINE (U+005F)
  • INVERTED EXCLAIMATION MARK (U+001A)
  • OVERLINE (U+203E)
  • EURO SIGN (U+20AC)
  • KATAKANA-HIRAGANA VOICED SOUND MARK (U+309B)
  • KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (U+309B)
  • FULLWIDTH NUMBER SIGN (U+FF03)
  • FULLWIDTH DOLLAR SIGN (U+FF04)
  • FULLWIDTH LOW LINE (U+FF3F)
  • Identifier-extender characters must be in the session character set and belong to one of the following Unicode General Category classes:

  • Non-spacing marks [Mn]
  • Spacing combing marks [Mc]
  • Decimal numbers [Nd]
  • Connector punctuations [Pc]
  • Formatting codes [Cf]
  • Note: The MIDDLE DOT character is also a valid identifier-extender character.

    Characters allowed only in object names that are enclosed in quotation marks

    A quoted string is required for object names that:

  • Have an identifier-extender character as the first character.
  • Include the white space character, SPACE (U+022)
  • Are Teradata keywords
  • In addition, object names that contain any character from the following classes must be enclosed in quotation marks, unless the character explicitly appears in the list of allowed characters:

  • Other, Control [Cc]
  • Other, Not Assigned [Cn]
  • Note: No characters in this category appear in UNICODE character repertoire.

  • Other, Private Use [Co]
  • Other, Surrogate [Cs]
  • Letter, Cased [LC]
  • Mark, Enclosing [Me]
  • Number, Other [No]
  • Punctuation, Dash [Pd]
  • Punctuation, Close [Pe]
  • Punctuation, Final quote [Pf] (may behave like Ps or Pe depending on usage)
  • Punctuation, Initial quote [Pi] (may behave like Ps or Pe depending on usage)
  • Punctuation, Other [Po]
  • Punctuation, Open [Ps]
  • Symbol, Currency [Sc]
  • Symbol, Modifier [Sk]
  • Symbol, Math [Sm]
  • Symbol, Other [So]
  • Separator, Line [Zl]
  • Separator, Paragraph [Zp]
  • Separator, Space [Zs]
  • Note: When used to enclose an object name, the beginning and ending quotation marks must be represented as a sequence of two QUOTATION MARK characters (U+0022). Each set of two quotation marks is counted as one character when calculating the name size limit.

    Disallowed characters

    The following characters cannot appear in an object name:

  • NULL (U+0000)
  • SUBSTITUTE character (U+001A)
  • REPLACEMENT CHARACTER (U+FFFD)
  • Compatibility ideographs (U+FA6C, U+FA6F, U+FAD0, FAD1, FAD5, FAD6, and FAD7)
  • Note: The setting of the NameValidationRule field may define additional character restrictions. See Utilities.

    Other considerations

    These additional restrictions apply:

  • An object name consisting entirely of white spaces is not allowed.
  • A trailing white space is not considered part of an object name.
  • You can use the NameValidationRule field to restrict object name allowable characters to a subset of those normally allowed with object naming. See Utilities.
  • All object names are stored in the data dictionary in UNICODE. Teradata provides a file, UOBJNEXT.txt, which lists the UNICODE characters valid for object names. The file is available on the Teradata User Documentation CD and at http://www.info.teradata.com.

    Use of these UNICODE characters in object names is subject to limitations imposed by:

  • The session (client) character set. See Chapter 2: “Client Character Set Options.”
  • Object naming controls. See SQL Fundamentals.
  • Object names and literals returned by HELP and SHOW statements, and by requests that specify the EXPLAIN modifier, may not be sharable among clients with differing client (session) character sets.

  • For SQL SHOW and EXPLAIN, any literals and object names that include characters not in the repertoire of the session character set, or that are otherwise unprintable, are shown as UNICODE delimited literals or identifiers. Specific incompatible characters are escaped to hexadecimal.
  • For SQL HELP, the Column SQL Name and Title fields identify names/strings containing characters that are not translatable into the client character set, and show replacement characters for individual untranslatable characters.
  • For details, see SQL Data Definition Language Syntax and Examples.

    Related Information

     

    For information on...

    See...

    Using the SHOW, HELP, and EXPLAIN commands

    SQL Data Definition Language Syntax and Examples

    UNICODE delimited literals and identifiers

    SQL Fundamentals