Of all of the mails Holger wrote today I'm just commenting on this. I
fully agree to the other mails ....
> Thinking more about trimming, I am becoming more and more convinced that
> CHAR should be treated as fixed size char[] in Java as well, just like
> byte[] (via wrapper type 'CharacterArray' to track changes - like Andrus'
> NSData-like ByteArray wrapper idea). No matter where
> stripping/no-stripping is done, it's always 'kind of' wrong - basically
> the fault is in the physical data model and I think if people chose the
> wrong data type we should not try to fix this.
> Opinions?
Couldn't agree more. If you browse the archives you'll find some earlier
comments from me as I stumbled over the CHAR column trimming when
implementing the Postgres adaptor.
I still don't see any use in defining CHAR columns that have to be
TRIM()ed in queries - even if CHAR columns were faster (which I'll still
have to see proved), you'll lose much of that gains when TRIM()in in
queries - generally I found queries incorporating server side functions
real performance suckers.
If you want variable length Strings then go for VARCHAR. I like the idea
of fixed size char[] values coming out of CHAR columns, this is the only
real world usage I can currently imagine for CHAR cols. For the rest I'd
just use VARCHAR.
-dirk
This archive was generated by hypermail 2.0.0 : Tue Mar 04 2003 - 12:19:44 EST