Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCnmJ-00072y-AT for pgsql-hackers@arkaria.postgresql.org; Sun, 08 Aug 2021 18:44:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mCnmI-0005Lx-3P for pgsql-hackers@arkaria.postgresql.org; Sun, 08 Aug 2021 18:44:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCnmH-0005Lo-Rl for pgsql-hackers@lists.postgresql.org; Sun, 08 Aug 2021 18:44:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCnmF-0003dx-UR for pgsql-hackers@postgresql.org; Sun, 08 Aug 2021 18:44:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 178Ii2q83188080; Sun, 8 Aug 2021 14:44:02 -0400 From: Tom Lane To: Mark Dilger cc: PostgreSQL-development Subject: Re: Assert triggered during RE_compile_and_cache In-reply-to: <059A9825-0101-42B0-9E1C-0F71C2E13E96@enterprisedb.com> References: <0203588E-E609-43AF-9F4F-902854231EE7@enterprisedb.com> <7F9BFA6F-9BC6-4A27-BFA1-2F01682BD644@enterprisedb.com> <2426993.1628201727@sss.pgh.pa.us> <29C525E6-A912-459F-BE27-217F25F76B5E@enterprisedb.com> <2437330.1628205382@sss.pgh.pa.us> <2442241.1628208783@sss.pgh.pa.us> <2822987.1628372679@sss.pgh.pa.us> <2860330.1628384606@sss.pgh.pa.us> <3183669.1628443776@sss.pgh.pa.us> <69308827-2F4E-426A-BE94-BD3EE11DFC1F@enterprisedb.com> <059A9825-0101-42B0-9E1C-0F71C2E13E96@enterprisedb.com> Comments: In-reply-to Mark Dilger message dated "Sun, 08 Aug 2021 11:02:03 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3188078.1628448242.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 08 Aug 2021 14:44:02 -0400 Message-ID: <3188079.1628448242@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mark Dilger writes: > There are a few changes which appear correct to me, but I don't know if = you expected them: > select regexp_match('hko', '((((? - 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}?(((? regexp_replace > ---------------- > - tl > + jxl > (1 row) This looks like also a consequence of 4aea704a5. regards, tom lane