Subject Re: [firebird-support] 60 chars in a 50 field
Author Ann W. Harrison
Chad Z. Hower aka Kudzu wrote:
> I have a:
> "Name" VARCHAR(50) NOT NULL,
>
> Its Unicode_FSS.
>
> Now somehow some of the columsn have 60 characters in them? I have intenral
> logic that is tripping up now because its "double" checking stuff from the
> db and noticed that 60>50.
>
> How can this be in the db?

Through the magic of variable length characters. Firebird's Unicode-FSS
(aka UTC-8) checks for a byte-length overflow, but ignores character
length overflows. One argument is "If the string fits in the space, why
throw it out?" In the case of our system tables (nominally Unicode-FSS)
that's really important or every name would be limited to 10 characters.

Regards,


Ann