Code review for regexp_matches/regexp_split patch. Refactor to avoid assuming

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 1b70619311f74ccbab52dfad7e0c96c36b6718a5
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-08-11T03:56:24Z
Releases: 8.3.0
Code review for regexp_matches/regexp_split patch.  Refactor to avoid assuming
that cached compiled patterns will still be there when the function is next
called.  Clean up looping logic, thereby fixing bug identified by Pavel
Stehule.  Share setup code between the two functions, add some comments, and
avoid risky mixing of int and size_t variables.  Clean up the documentation a
tad, and accept all the flag characters mentioned in table 9-19 rather than
just a subset.

Files

PathChange+/−
doc/src/sgml/func.sgml modified +33 −32
src/backend/utils/adt/regexp.c modified +331 −290
src/test/regress/expected/strings.out modified +25 −6
src/test/regress/sql/strings.sql modified +6 −2