Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Nov 2022 22:07:07 +0000 (17:07 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Nov 2022 22:07:07 +0000 (17:07 -0500)
commitc0eed88914c0986e0c64c9d0944c89e1c5bdb1e3
treeabe54c862359969d2fcaccf593b8e1e9d0e56676
parent140c80372327fb7723859d982b3efda754b266a7
Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline.

I just spent an annoying amount of time reverse-engineering the
100%-undocumented API between ts_headline and the text search
parser's prsheadline function.  Add some commentary about that
while it's fresh in mind.  Also remove some unused macros in
wparser_def.c.

While at it, I noticed that when commit 78e73e875 added a
CHECK_FOR_INTERRUPTS call in TS_execute_recurse, it missed
doing so in the parallel function TS_phrase_execute, which
surely needs one just as much.

Back-patch because of the missing CHECK_FOR_INTERRUPTS.
Might as well back-patch the rest of this too.
src/backend/tsearch/ts_parse.c
src/backend/tsearch/wparser_def.c
src/backend/utils/adt/tsvector_op.c
src/include/tsearch/ts_public.h