Re: [COMMITTERS] 'pgsql/src/backend/parser gram.y'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(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:06:07
Message-ID: 24839.928767967@sss.pgh.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?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-06-07 15:07:39 Re: [HACKERS] Bug in LIKE ?
Previous Message Tom Lane 1999-06-07 14:58:55 Re: [HACKERS] 6.6 items