Subject Re: [IBO] Re: Right Trimming Again
Author Geoff Worboys
> You are confirming something that I had seen, and I think
> that this is actual a major fault with IB,

I am inclined to agree. I may be in favour of right trimming by
default, but once you have placed some data in the database it should
not be ignored in this manner.


> so where do we 'complain'
> about it? Borland or Firebird.

Both. I have not run the script over a Firebird release yet so I
guess there is a small chance it has been changed there. Anyone
running Firebird 0.94 that can test?


> I have no option but it include the spaces, and they have to be
> in the search was well as the data. My problem came about because
> the data had lost the white space and so no longer matched the
> mainframe feeds.

I can certainly see how this "feature" :-) would be a major problem in
your circumstances.

CHARACTER SET OCTETS can be used for binary data (such as password
storage) but such a setup is horribly inconvenient for what are
essentially just text fields with significant spaces.

IMO using LIKE processing would just be too confusing. UDFs may be
the way to go HOWEVER this will be likely to stuff up Interbase
optimisation of queries. It may be necessary to setup your queries so
that both comparisons are performed or use the UDF comparison and
force the required plan.

eg. WHERE SPACEFIELD='TEST' AND
StrCompare(SPACEFIELD,'TEST')=0

I think this would allow optimisation using the first clause
(presuming there is an appropriate index involved) but then allow
further restriction using the UDF comparison.

Obviously the better long term fix would be to have IB do the right
thing.


Geoff Worboys
Telesis Computing