Subject Right-trimming defaults WAS Re: [IBO] ib_query ignores my data!
Author Helen Borrie
At 03:56 PM 22-03-01 -0700, you wrote:

>It isn't uncommon for the majority rule to take precedence over mathematical
>correctness. In the case of IBO, if you are the unusual case that needs
>whitespace left alone it is a simple setting to do so. That was the decision
>I made back when I made it this way.

IMO, this is the key point. Theoretically "all characters matter" but in practice, trailing whitespace is redundant and usually accidental. In the 99% case, it gets there because a user leaned on the spacebar during an edit. IBO already lets you handle the 1% case. For the integrity of the data, that should be restricted to columns which user input cannot influence. Any application which allows users to input "significant" trailing whitespace is defective, considering that there is no feedback to the UI as to the size of such whitespace. However, that is a developer choice: if a developer wants to include such risk in his UI, IBO already has the means to allow it. Just don't change the status quo to cater for bad UI design.

I have no argument to support left-trimming or instring-trimming: but that is NOT the issue here. I think David Trudgett's comments are not pertinent to right-trimming in the 99% case.

The default right-trimming behaviour is a workaround to enhance performance in the buffers but it also has other benefits. I shudder to think of the impact of changing the default behaviour (reports overloaded with unwanted whitespace, the need to alter parsers, the double or triple impact on apps written over databases with widestring charsets, etc. etc.) Let's KEEP the current behaviour wrt both char and varchar and DOCUMENT it clearly. It's not IBO's job to emulate the past errors of others, nor to supply default behaviour that breaks good designs to cater for bad UI design. It was the right design choice when it was originally made and it still is.

Jeanne d'Arc
(alias Helen)

:)


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________