Re: Empty string in lexeme for tsvector

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Empty string in lexeme for tsvector
Дата
Msg-id 2997142.1632944171@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Empty string in lexeme for tsvector  (Jean-Christophe Arnu <jcarnu@gmail.com>)
Ответы Re: Empty string in lexeme for tsvector  (Jean-Christophe Arnu <jcarnu@gmail.com>)
Список pgsql-hackers
Jean-Christophe Arnu <jcarnu@gmail.com> writes:
> [ empty_string_in_tsvector_v4.patch ]

I looked through this patch a bit.  I don't agree with adding
these new error conditions to tsvector_setweight_by_filter and
tsvector_delete_arr.  Those don't prevent bad lexemes from being
added to tsvectors, so AFAICS they can have no effect other than
breaking existing applications.  In fact, tsvector_delete_arr is
one thing you could use to fix existing bad tsvectors, so making
it throw an error seems actually counterproductive.

(By the same token, I think there's a good argument for
tsvector_delete_arr to just ignore nulls, not throw an error.
That's a somewhat orthogonal issue, though.)

What I'm wondering about more than that is whether array_to_tsvector
is the only place that can inject an empty lexeme ... don't we have
anything else that can add lexemes without going through the parser?

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: jsonb crash
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: [BUG] failed assertion in EnsurePortalSnapshotExists()