pgsql: Miscellaneous cleanup of regular-expression compiler.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Miscellaneous cleanup of regular-expression compiler.
Date: 2015-10-16 19:56:32
Message-ID: E1ZnB7A-0005hN-6N@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/afdfcd3f7617c9b7be5966d66ddabdc2e92eb99b

Modified Files
--------------
src/backend/regex/README | 95 +++++++++++++++++++++++++++++++----
src/backend/regex/regc_nfa.c | 55 +++++++-------------
src/backend/regex/regcomp.c | 11 ++--
src/test/regress/expected/regex.out | 35 +++++++++++++
src/test/regress/sql/regex.sql | 11 ++++
5 files changed, 153 insertions(+), 54 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-10-16 21:24:31 pgsql: Allow a parallel context to relaunch workers.
Previous Message Robert Haas 2015-10-16 18:21:17 pgsql: Remove volatile qualifiers from proc.c and procarray.c