-
- Downloads
Fix regexp_matches() handling of zero-length matches.
We'd find the same match twice if it was of zero length and not immediately adjacent to the previous match. replace_text_regexp() got similar cases right, so adjust this search logic to match that. Note that even though the regexp_split_to_xxx() functions share this code, they did not display equivalent misbehavior, because the second match would be considered degenerate and ignored. Jeevan Chalke, with some cosmetic changes by me.
Showing
- src/backend/utils/adt/regexp.c 6 additions, 7 deletionssrc/backend/utils/adt/regexp.c
- src/backend/utils/adt/varlena.c 4 additions, 1 deletionsrc/backend/utils/adt/varlena.c
- src/test/regress/expected/strings.out 58 additions, 0 deletionssrc/test/regress/expected/strings.out
- src/test/regress/sql/strings.sql 7 additions, 0 deletionssrc/test/regress/sql/strings.sql
Loading
Please register or sign in to comment