pgsql: Miscellaneous cleanup of regular-expression compiler. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Miscellaneous cleanup of regular-expression compiler.
Date
Msg-id E1ZnB7A-0005iu-Cu@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/4083a52f4173b87a883537a1e2957413c2aebd9e

Modified Files
--------------
src/backend/regex/regc_nfa.c |   55 +++++++++++++-----------------------------
src/backend/regex/regcomp.c  |   11 +++++----
2 files changed, 23 insertions(+), 43 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix regular-expression compiler to handle loops of constraint ar
Next
From: Tom Lane
Date:
Subject: pgsql: Fix O(N^2) performance problems in regular-expression compiler.