• Tom Lane's avatar
    Suppress unnecessary regex subre nodes in a couple more cases. · 4604f83f
    Tom Lane authored
    This extends the changes made in commit cebc1d34, 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
    4604f83f
regcomp.c 67.4 KB