postgresql/src
Tom Lane 08c0d6ad65 Invent "rainbow" arcs within the regex engine.
Some regular expression constructs, most notably the "." match-anything
metacharacter, produce a sheaf of parallel NFA arcs covering all
possible colors (that is, character equivalence classes).  We can make
a noticeable improvement in the space and time needed to process large
regexes by replacing such cases with a single arc bearing the special
color code "RAINBOW".  This requires only minor additional complication
in places such as pull() and push().

Callers of pg_reg_getoutarcs() must now be prepared for the possibility
of seeing a RAINBOW arc.  For the one known user, contrib/pg_trgm,
that's a net benefit since it cuts the number of arcs to be dealt with,
and the handling isn't any different than for other colors that contain
too many characters to be dealt with individually.

This is part of a patch series that in total reduces the regex engine's
runtime by about a factor of four on a large corpus of real-world regexes.

Patch by me, reviewed by Joel Jacobson

Discussion: https://postgr.es/m/1340281.1613018383@sss.pgh.pa.us
2021-02-20 18:11:56 -05:00
..
backend Invent "rainbow" arcs within the regex engine. 2021-02-20 18:11:56 -05:00
bin Fix psql's ON_ERROR_ROLLBACK so that it handles COMMIT AND CHAIN. 2021-02-19 22:01:25 +09:00
common Add result size as argument of pg_cryptohash_final() for overflow checks 2021-02-15 10:18:34 +09:00
fe_utils Generalize parallel slot result handling. 2021-02-05 16:08:45 -05:00
include Invent "rainbow" arcs within the regex engine. 2021-02-20 18:11:56 -05:00
interfaces Allow specifying CRL directory 2021-02-18 07:59:10 +01:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Remove extra increment of plpgsql's statement counter for FOR loops. 2021-02-02 14:35:12 -05:00
port pg_attribute_no_sanitize_alignment() macro 2021-02-12 17:23:35 +03:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Fix bug in COMMIT AND CHAIN command. 2021-02-19 21:57:52 +09:00
timezone Update time zone data files to tzdata release 2021a. 2021-01-24 16:29:47 -05:00
tools Allow multiple xacts during table sync in logical replication. 2021-02-12 07:41:51 +05:30
tutorial Doc, more or less: uncomment tutorial example that was fixed long ago. 2021-01-13 16:00:03 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Introduce --with-ssl={openssl} as a configure option 2021-02-01 19:19:44 +09:00
Makefile.shlib Add PostgreSQL home page to --help output 2020-02-28 13:12:21 +01:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00