Subject Re: [firebird-support] Value '' in varchar column
Author Norman Dunbar
On 28/10/10 15:49, Ann W. Harrison wrote:
> Just so people don't get confused, in memory and in messages,
> varchar fields are stored at their full declared length. Before
> the memory format of a record goes to disk, it suffers run length
> compression, so - ignoring everything around it - the empty
> varchar(6) is stored as two bytes with binary values of -8 and 0.

If anyone is interested, there's a document which is a work in progress
on the docs pile at:

http://www.firebirdsql.org/manual/fb-internals.html and also a pdf
version at:

http://www.firebirdsql.org/pdfmanual/Firebird-Internals.pdf

It attempts to explain the workings of the compression mentioned by Ann.

Please, if you wish to ask me about this document, do it on the docs
list otherwise I'll have to answer to Helen again! This isn't the list
to discuss the docs. Ta.

Cheers,
Norman.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767