Subject Re: [firebird-support] Is this a bug? (FB 2.1 <...> 2.1.2)
Author Lester Caine
Dimitry Sibiryakov wrote:
>> ? Alright fixed length character fields may be a bit long in the tooth,
>> but they do still have a place. Yes they can be defined as varchar, but
>> that hides the fact that they are always full length, and I would expect
>> them to be packed to full length when output?
>
> I don't know what "output" you have in mind, but on disk CHAR and
> VARCHAR are stored the same way - in full length, RLE compressed.
> The topic starter obviously need VARCHAR, because he wants to look
> for string by it's last character ('A') and ignores the fact, that
> "half-filled" CHARs have space at it's last character. That's OK, I also
> was ignorant years ago and chose CHARs without strong reason.

Storage is a different matter.
VARCHAR returns a terminated string, CHAR returns a space packed string
... in my book ... so CHAR has a place, and expecting it to work like a
VARCHAR is the error me thinks?

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php