BUG #16744: ts_headline behaves incorrectly with <-> and proximity operators - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #16744: ts_headline behaves incorrectly with <-> and proximity operators
Date
Msg-id 16744-861496b4f8f941f2@postgresql.org
Whole thread Raw
Responses Re: BUG #16744: ts_headline behaves incorrectly with <-> and proximity operators
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16744
Logged by:          Stas Obydionnov
Email address:      stas@hellofyllo.com
PostgreSQL version: 12.3
Operating system:   runs on AWS RDS
Description:

When running the following code
    select ts_headline('Alpha Beta Gama', phraseto_tsquery ('alpha gama'))

or 
    select ts_headline('Alpha Beta Gama', to_tsquery ('alpha <-> gama'))
I would expect the result be not to be highlighted, however the result looks
like:
    <b>Alpha</b> Beta <b>Gama</b>

The same behavior is found for the following operator:
    select ts_headline('Alpha Beta Gama Delta', phraseto_tsquery ('alpha <3>
gama'))


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16739: Temporary files not deleting from data folder on disk
Next
From: Tom Lane
Date:
Subject: Re: BUG #16744: ts_headline behaves incorrectly with <-> and proximity operators