]> granicus.if.org Git - postgresql/commit
Miscellaneous cleanup of regular-expression compiler.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Oct 2015 19:52:12 +0000 (15:52 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 Oct 2015 19:55:59 +0000 (15:55 -0400)
commitafdfcd3f7617c9b7be5966d66ddabdc2e92eb99b
tree649a7254e007bc3f4989e1bd9bb63913ef5fc049
parent538b3b8b359fa77cb7e1507113efb788b4e159c9
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.
src/backend/regex/README
src/backend/regex/regc_nfa.c
src/backend/regex/regcomp.c
src/test/regress/expected/regex.out
src/test/regress/sql/regex.sql