Re: Assert triggered during RE_compile_and_cache

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assert triggered during RE_compile_and_cache
Date: 2021-08-08 18:44:02
Message-ID: 3188079.1628448242@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> writes:
> There are a few changes which appear correct to me, but I don't know if you expected them:

> select regexp_match('hko', '((((?<!.))))(.(\3)(\1.))');
> - regexp_match
> ---------------
> -
> + regexp_match
> +--------------------
> + {"","","",hk,"",k}
> (1 row)

Yes, this one is a consequence of 4aea704a5 (Fix semantics of regular
expression back-references). The lookbehind constraint should not be
applied within the back-ref.

> select 'nigqvigqvee' !~ '(())((\2)\2)(?:([^\W]))';
> -ERROR: invalid regular expression: invalid escape \ sequence
> + ?column?
> +----------
> + f
> +(1 row)
> +

and this one of 2a0af7fe4 (Allow complemented character class escapes
within regex brackets).

> select regexp_replace('tl', '.{0}?(((?<![^][^]{1}?)))(.)\2{6}?', 'jx', 'mt');
> regexp_replace
> ----------------
> - tl
> + jxl
> (1 row)

This looks like also a consequence of 4aea704a5.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-08-08 18:53:39 Re: elog.c query_id support vs shutdown
Previous Message Michael Meskes 2021-08-08 18:34:53 Re: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE