Currently x[1..n] = 'x' is converted to
x between 'x'[1..n] + '\00\00\00\00\00\00' and 'x'[1..n] + '\FF\FF\FF\FF\FF\FF'
However there are two [problems:
- Variable size fields have no upper bound (they also don't really have an lower bound!)
- The padding characters are not valid unicode. That especially applies to \FF
One solution would be to change the filter to x IN ['x', 'y'). That avoids the problem of \FF. However I don't think there is a way of calculating 'y' (i.e. the next value) for a unicode string. You would also have problems with tab characters in strings, and would need to generate ['x\00', 'y\00') to avoid the problem.
Richard Chapman on reflection I suspect the only real solution is to implement a substring field filter.