F.30. mchar#
F.30. mchar #
The mchar module provides additional data types for compatibility with Microsoft SQL Server (MS SQL).
F.30.1. Overview #
This module has been designed to improve 1C Enterprise support, most popular Russian CRM and ERP system.
It implements types MCHAR
and MVARCHAR
, which are bug-to-bug
compatible with MS SQL CHAR and VARCHAR respectively.
Additionally, these types use the ICU library for comparison and
case conversion, so their behavior is identical across different
operating systems.
Tantor SE-1C also includes
citext extension which provides types
similar to MCHAR
. But this extension doesn't emulate MS-SQL
behavior concerning end-of-value whitespace.
Differences from Tantor SE-1C CHAR and VARCHAR are:
Case insensitive comparison
Handling of the whitespace at the end of string
These types are always stored as two-byte unicode value regardless of database encoding.
F.30.2. Additional types #
mchar
— analog of the MS SQL char typemvarchar
— analog of the MS SQL varchar type
F.30.3. MCHAR and MVARCHAR Features #
Defines
length(str)
functionDefines
substr(str, pos[, length])
functionDefines
||
operator, which would be applied to concatenate any (mchar
andmvarchar
) argumentsDefines set of operators:
<
,<=
,=
,>=
,>
for case-insensitive comparison (ICU)Defines set of operators:
&<
,&<=
,&=
,&>=
,&>
for case-sensitive comparison (ICU)Implicit cast between
mchar
andmvarchar
typesB-tree and Hash-index support
The
LIKE [ESCAPE]
operator supportThe
SIMILAR TO [ESCAPE]
operator supportThe
~
operator (POSIX regexp) supportIndex support for the
LIKE
operator
F.30.4. Authors #
Oleg Bartunov, Teodor Sigaev.