pgsql: Fix two bugs in tsquery @> operator.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix two bugs in tsquery @> operator.
Дата
Msg-id E1Xig2M-0003vh-Am@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix two bugs in tsquery @> operator.

1. The comparison for matching terms used only the CRC to decide if there's
a match. Two different terms with the same CRC gave a match.

2. It assumed that if the second operand has more terms than the first, it's
never a match. That assumption is bogus, because there can be duplicate
terms in either operand.

Rewrite the implementation in a way that doesn't have those bugs.

Backpatch to all supported versions.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1aa526f3f18feb2434870b1f1c78cfc0aa87d56f

Modified Files
--------------
src/backend/utils/adt/tsquery_op.c |  131 +++++++++++++++++++++++++-----------
1 file changed, 90 insertions(+), 41 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix two bugs in tsquery @> operator.
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Fix two bugs in tsquery @> operator.