diff options
Diffstat (limited to 'src/backend/regex/regcomp.c')
-rw-r--r-- | src/backend/regex/regcomp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c index d9840171a33..473738040bb 100644 --- a/src/backend/regex/regcomp.c +++ b/src/backend/regex/regcomp.c @@ -599,6 +599,13 @@ makesearch(struct vars *v, /* and ^* and \A* too -- not always necessary, but harmless */ newarc(nfa, PLAIN, nfa->bos[0], pre, pre); newarc(nfa, PLAIN, nfa->bos[1], pre, pre); + + /* + * The pattern is still MATCHALL if it was before, but the max match + * length is now infinity. + */ + if (nfa->flags & MATCHALL) + nfa->maxmatchall = DUPINF; } /* |