aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/complex.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-08-27 12:18:58 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-08-27 12:18:58 -0400
commit3068e45799327298a3f4c22b03db2aa48e2ab0da (patch)
tree9557f5b62eba01d42f303ee79e8afb0316a58c92 /src/tutorial/complex.c
parentba05dfe943046820312eaa20995ffc626936b8be (diff)
downloadpostgresql-3068e45799327298a3f4c22b03db2aa48e2ab0da.tar.gz
postgresql-3068e45799327298a3f4c22b03db2aa48e2ab0da.zip
Handle interaction of regexp's makesearch and MATCHALL more honestly.
Second thoughts about commit 824bf7190: we apply makesearch() to an NFA after having determined whether it is a MATCHALL pattern. Prepending ".*" doesn't make it non-MATCHALL, but it does change the maximum possible match length, and makesearch() failed to update that. This has no ill effects given the stylized usage of search NFAs, but it seems like it's better to keep the data structure consistent. In particular, fixing this allows more honest handling of the MATCHALL check in matchuntil(): we can now assert that maxmatchall is infinity, instead of lamely assuming that it should act that way. In passing, improve the code in dump[c]nfa so that infinite maxmatchall is printed as "inf" not a magic number.
Diffstat (limited to 'src/tutorial/complex.c')
0 files changed, 0 insertions, 0 deletions