Add datatypes (VAR)BINARY(n) and BINARY VARYING(n) as alias for (VAR)CHAR(n) CHARACTER SET OCTETS [CORE5064] #5351
Submitted by: @mrotteveel
Assigned to: @aafemt
Relate to CORE5494
The CHAR(n) CHARACTER SET OCTETS and VARCHAR(n) CHARACTER SET OCTETS types are basically the SQL standard type BINARY and VARBINARY (or BINARY VARYING). Please add the following aliases for these types:
* BINARY(n) for CHAR(n) CHARACTER SET OCTETS
Using either the alias or the 'old' full definition should become an explicit subtype of CHAR and VARCHAR, instead of implicit based on the character set id as it is now. This can be achieved by setting the subtype in RDB$FIELD_SUB_TYPE (in RDB$FIELDS and RDB$FUNCTION_ARGUMENTS) to 1 (CS_BINARY). This has the added benefit that tools can use this information to determine the data type consistently based on type and subtype; this would be compatible with current usage of the sqlsubtype in XSQLVAR to communicate the character set id.
The text was updated successfully, but these errors were encountered: