Miscellaneous cleanup of regular-expression compiler.

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

Commit: f189747d4692bddc2f07c622d7d83b1bcbf48fbf
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2015-10-16T19:52:12Z
Releases: 9.4.6
Miscellaneous cleanup of regular-expression compiler.

Revert our previous addition of "all" flags to copyins() and copyouts();
they're no longer needed, and were never anything but an unsightly hack.

Improve a couple of infelicities in the REG_DEBUG code for dumping
the NFA data structure, including adding code to count the total
number of states and arcs.

Add a couple of missed error checks.

Add some more documentation in the README file, and some regression tests
illustrating cases that exceeded the state-count limit and/or took
unreasonable amounts of time before this set of patches.

Back-patch to all supported branches.

Files

PathChange+/−
src/backend/regex/README modified +84 −11
src/backend/regex/regc_nfa.c modified +17 −38
src/backend/regex/regcomp.c modified +6 −5
src/test/regress/expected/regex.out modified +35 −0
src/test/regress/sql/regex.sql modified +11 −0