Re: Rethinking the implementation of ts_headline()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, sebastian(dot)patino-lang(at)posteo(dot)net
Subject: Re: Rethinking the implementation of ts_headline()
Date: 2023-01-16 16:28:52
Message-ID: 1881797.1673886532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> I came across #17556 which contains a different test for this, and I'm
> not sure that this patch changes things completely for the better.

Thanks for looking at my patch. However ...

> That is, once past the 5000 words of distance, it fails to find a good
> cover, but before that it returns an acceptable headline. However,
> after your proposed patch, we get this:

> ts_headline │ ts_headline
> ─────────────┼─────────────
> {ipsum} │ {ipsum}
> (1 fila)

I get this with the patch:

ts_headline | ts_headline
---------------------+---------------------
{ipsum} ... {labor} | {ipsum} ... {labor}
(1 row)

which is what I'd expect, because it removes the artificial limit on
cover length that I added in 78e73e875. So I'm wondering why you got a
different result. Maybe something to do with locale? I tried it in
C and en_US.utf8.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-01-16 16:33:32 Re: Perform streaming logical transactions by background workers and parallel apply
Previous Message Ashutosh Bapat 2023-01-16 16:27:50 Re: Logical replication timeout problem