From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y' |
Date: | 1999-06-07 15:35:35 |
Message-ID: | 199906071535.LAA09213@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Vadim Mikheev | 1999-06-07 15:40:14 | Re: [HACKERS] Open 6.5 items |
Previous Message | Tom Lane | 1999-06-07 15:33:04 | Re: [HACKERS] Bug in LIKE ? |