Re: BUG #14623: pg_trgm doesn't correctly process some regexp with negative lookahead

From: Corey Csuhta <its+postgres(at)csuhta(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14623: pg_trgm doesn't correctly process some regexp with negative lookahead
Date: 2017-04-14 05:05:06
Message-ID: 606E7756-3DAE-482D-9131-A002F3F02CFD@csuhta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Does this still seem like a problem? Is it helpful if I submit a new bug # for tracking purposes?

> On Apr 14, 2017, at 12:54 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Corey Csuhta <its+postgres(at)csuhta(dot)com> writes:
>> I don’t know if this is related or a separate bug, but I am also having this problem with the `+` operator and character classes. Very similar test case:
>> CREATE TABLE foobar (x text);
>> INSERT INTO foobar VALUES ('Trying +1/+1'),('Also doing +20/+20');
>> CREATE EXTENSION pg_trgm;
>> CREATE INDEX ON foobar USING gin (x gin_trgm_ops);
>> SET enable_seqscan TO on;
>> SELECT * FROM foobar WHERE x ~ '\+\d+\/\+\d+'; -- Returns both rows
>> SET enable_seqscan TO off;
>> SELECT * FROM foobar WHERE x ~ '\+\d+\/\+\d+'; -- Returns 0 rows
>
> Hmm ... seems unrelated, since there's no lookahead constraint in this
> example. Also, the patch I committed earlier today doesn't fix it.
>
> regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-04-14 05:18:21 Re: BUG #14623: pg_trgm doesn't correctly process some regexp with negative lookahead
Previous Message Tom Lane 2017-04-14 04:54:10 Re: Re: BUG #14623: pg_trgm doesn't correctly process some regexp with negative lookahead