Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y'
От | Bruce Momjian |
---|---|
Тема | Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y' |
Дата | |
Msg-id | 199906071535.LAA09213@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y' (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y'
|
Список | pgsql-hackers |
> 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? DoMatch, which implements LIKE clearly thinks %% is %, and I think our users think so too. I would not change it. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: