pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Suppress unnecessary regex subre nodes in a couple more cases.
Date: Tue, 02 Mar 2021 17:14:26 +0000
Message-ID: <E1lH8bK-0006xe-4W@gemulon.postgresql.org> (raw)

Suppress unnecessary regex subre nodes in a couple more cases.

This extends the changes made in commit cebc1d34e, teaching
parseqatom() to generate fewer or cheaper subre nodes in some edge
cases.  The case of interest here is a quantified atom that is "messy"
only because it has greediness opposite to what preceded it (whereas
captures and backrefs are intrinsically messy).  In this case we don't
need an iteration node, since we don't care where the sub-matches of
the quantifier are; and we might also not need a second concatenation
node.  This seems of only marginal real-world use according to my
testing, but I wanted to get it in before wrapping up this series of
regex performance fixes.

Discussion: https://postgr.es/m/1340281.1613018383@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4604f83fdfe030a2f1984159ede5270c1d825310

Modified Files
--------------
src/backend/regex/regcomp.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)



Message-ID: <E1lH8bK-0006xe-4W@gemulon.postgresql.org>
Permalink:  ../E1lH8bK-0006xe-4W@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lH8bK-0006xe-4W@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Suppress unnecessary regex subre nodes in a couple more cases.
  In-Reply-To: <E1lH8bK-0006xe-4W@gemulon.postgresql.org>
  References: <E1lH8bK-0006xe-4W@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox