Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> Repair recently-introduced error in makeIndexable for LIKE:
>> a non-leading % would be put into the >=/<= patterns. Also, repair
>> longstanding confusion about whether %% means a literal %%. The SQL92
>> doesn't say any such thing, and textlike() knows that, but gram.y didn't.
> Houston, we have a problem. DoMatch has:
> case '%':
> /* %% is the same as % according to the SQL standard */
> /* Advance past all %'s */
> while (*p == '%')
> Don't we want %% to be %?
I looked at the spec, and this piece of code is right: there is nothing
in the spec that says that %% means anything other than two string
pattern matches (which of course has the same effect as one). So I made
gram.y agree.
It could be that people like Microsoft don't follow the spec... can
anyone check this?
regards, tom lane