]> granicus.if.org Git - postgresql/commit
Fix two bugs in tsquery @> operator.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 27 Oct 2014 08:50:41 +0000 (10:50 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 27 Oct 2014 08:51:38 +0000 (10:51 +0200)
commit10059c2da7ee2a355e261ed5e56dcec4657e01aa
tree091cf2e0dc6fbd8da5dc32ef28abff7d1a1ed7bd
parent21fa26b6594dc064310bee1cf725c68591ab8032
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.
src/backend/utils/adt/tsquery_op.c