-
- Downloads
Fix the general case of quantified regex back-references.
Cases where a back-reference is part of a larger subexpression that is quantified have never worked in Spencer's regex engine, because he used a compile-time transformation that neglected the need to check the back-reference match in iterations before the last one. (That was okay for capturing parens, and we still do it if the regex has *only* capturing parens ... but it's not okay for backrefs.) To make this work properly, we have to add an "iteration" node type to the regex engine's vocabulary of sub-regex nodes. Since this is a moderately large change with a fair risk of introducing new bugs of its own, apply to HEAD only, even though it's a fix for a longstanding bug.
Showing
- src/backend/regex/README 9 additions, 9 deletionssrc/backend/regex/README
- src/backend/regex/regcomp.c 52 additions, 36 deletionssrc/backend/regex/regcomp.c
- src/backend/regex/regexec.c 757 additions, 7 deletionssrc/backend/regex/regexec.c
- src/include/regex/regguts.h 21 additions, 3 deletionssrc/include/regex/regguts.h
- src/test/regress/expected/regex.out 37 additions, 0 deletionssrc/test/regress/expected/regex.out
- src/test/regress/sql/regex.sql 8 additions, 0 deletionssrc/test/regress/sql/regex.sql
Loading
Please register or sign in to comment