Use character varying (n) instead of character(n) as the latter pads the values with white-space.