Handle MAXSTRLEN consistently

Поиск
Список
Период
Сортировка
Искать

Handle MAXSTRLEN consistently

От:
Zsolt Parragi <zsolt.parragi@percona.com>
Дата:
Вложения:
Hello!

Commit 23d9ad77181 added additional length checks for tsvector, but it
is inconsistent at one place: most checks use toklen > MAXSTRLEN as
the error condition, but array_to_tsvector uses >=. This causes a
strange corner-case issue: we can convert a 2047 length lexeme to an
array, as tsvector_to_array allows it, but we can't convert it back
with array_to_tsvector as it errors out.

0001 is a fix for this specific case.

After looking into this further, I realized that the length handling
is also inconsistent at other places, even before the mentioned
commit.

0002 addresses the other preexisting places that used >= for errors instead of >
FAQ