summaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-04-13 17:18:35 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-04-13 17:18:35 -0400
commitb179684c77bb16640cdea6fd3d7a1e333829334e (patch)
treec5228a3f9c57fadb06542affd7205d774dcf5228 /src/tutorial/funcs.source
parent89a41a1b6b7184700394c7ea13471084d05f3cc1 (diff)
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
Diffstat (limited to 'src/tutorial/funcs.source')
0 files changed, 0 insertions, 0 deletions