Subject Re: [firebird-support] blank spaces on Firebird fields?
Author Martijn Tonies
hi,

> Hi. I'm currently trying out Firebird with PHP.
>
> Correct me if I'm wrong. I think that firebird fills the remaining
> parts of the field with blank spaces. Say I have a varchar(50) field.
> I entered a record with, say, 10 characters. I noticed that when I
> retrieve the data, my textfield has the inputed character plus blank
> spaces which I suspect represents the other 40 spaces.

Wrong. This happens for CHAR fields, not VARCHAR.

> Questions:
>
> 1. If this is the case, does this mean that, if I declare a field of
> 50 chars, even if i don't use them all, each record will consume 50 bytes?
>
> 2. Is there a work around so that the other free spaces are not used up?

See above.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com