Q: Why do I get strange results with a CHAR(n) field?
A. Don't use CHAR(n). VARCHAR(n) has the behavior you are probably
expecting; on top of which it's more compact and usually faster.
I suppose the above needs some fleshing out, but man am I getting tired
of explaining about significant vs non-significant trailing blanks.
regards, tom lane