• In my oppinion ANSI padding (for storage) should always be on and I cannot see any justification for it not to be.

    If my program stores the varchar 'A' plus a space and I read it back, I expect the same result back, and not just an 'A'! It is my and my program's responsibility to make sure I trim/normalize any user input if this makes sense given the function of the data being entered by an user.

    I can only see this option as once added to support lazy and incorrect written code and this "feature" should have been declared obsolete a long time ago.

    Unfortunately, while ansi_padding works great on the storage part, it fails miserably when it comes to compares. There it performs always an rtrim, no matter what setting you use and this is really a braindead situation :(. It causes bugs and implies inherrent performance losses in many operations.

    My reasoning is that a trailing space constitues just as much information as does a trailing '0' or a trailing 'Z' and hence there should be no special, implied treatment/overhead when storing or comparing varchar fields.

    What also really annoys me with these pre-historical quirks is that len automatically performs a rtrim where it is not expected as well! Everyone I know has been at once time or another been surprised by this behavior.