postgresql/src
Tom Lane 67665a71c0 Fix regexport.c to behave sanely with lookaround constraints.
regexport.c thought it could just ignore LACON arcs, but the correct
behavior is to treat them as satisfiable while consuming zero input
(rather reminiscently of commit 9f1e642d5).  Otherwise, the emitted
simplified-NFA representation may contain no paths leading from initial
to final state, which unsurprisingly confuses pg_trgm, as seen in
bug #14623 from Jeff Janes.

Since regexport's output representation has no concept of an arc that
consumes zero input, recurse internally to find the next normal arc(s)
after any LACON transitions.  We'd be forced into changing that
representation if a LACON could be the last arc reaching the final
state, but fortunately the regex library never builds NFAs with such
a configuration, so there always is a next normal arc.

Back-patch to 9.3 where this logic was introduced.

Discussion: https://postgr.es/m/20170413180503.25948.94871@wrigleys.postgresql.org
2017-04-13 17:18:35 -04:00
..
backend Fix regexport.c to behave sanely with lookaround constraints. 2017-04-13 17:18:35 -04:00
bin Back-patch checkpoint clarification docs and pg_basebackup updates 2017-04-01 17:27:12 +02:00
common pgindent run for 9.5 2015-05-23 21:35:49 -04:00
include Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:29 -04:00
interfaces Spelling fixes 2017-03-14 13:45:51 -04:00
makefiles Link $(WIN32RES) into single-file modules only when PGFILEDESC is set. 2015-08-05 20:45:21 -04:00
pl Adjust PL/Tcl regression test to dodge a possible bug or zone dependency. 2017-02-19 16:14:52 -05:00
port Stamp 9.5.6. 2017-02-06 16:47:25 -05:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:29 -04:00
test Fix integer-overflow problems in interval comparison. 2017-04-05 23:51:28 -04:00
timezone Update time zone data files to tzdata release 2016j. 2017-01-30 11:40:46 -05:00
tools MSVC: Include pg_recvlogical in client-only install. 2016-09-19 14:27:08 -04:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Document usage of COPT environment variable for adjusting configure flags. 2017-02-17 16:11:02 -05:00
Makefile.shlib Fix typos in comments. 2017-02-06 11:34:18 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00