On 2021-12-20 12:40, Norbert Saint Georges wrote:
Hello,
a varbinary has a subtype of 1 and not 0 (binary) normal?
You're thinking of BLOB SUB_TYPE, and this is unrelated to BLOB
SUB_TYPE, as it isn't a BLOB type.
In Firebird 4, VARBINARY is introduced as *an alias* for VARCHAR
CHARACTER SET OCTETS (and BINARY for CHAR CHARACTER SET OCTETS), and
"normal" VARCHAR (or CHAR) has sub_type 0. The character set OCTETS has
id 1, and some parts of Firebird communicate the character set in the
sub_type field (e.g. of XSQLDA), so to make this backwards compatible,
the character set id of OCTETS (1) is also used as its
RDB$FIELD_SUB_TYPE value. In that way, "old" tools handle it correctly
as (VAR)CHAR CHARACTER SET OCTETS, while Firebird 4.0 tools can identify
it as (VAR)BINARY.
Mark
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel