Re: intarray GiST index gets wrong answers for '{}' <@ anything

2019-08-06 Thread Tom Lane
Alexander Korotkov writes: > Users, who likes existing behavior of handling <@ operator in intarray > opclasses, may be advised to rewrite their queries as following. > "col <@ const" => "col <@ const AND col && const" Oh, that's a good suggestion --- it will work, and work reasonably well, with

Re: intarray GiST index gets wrong answers for '{}' <@ anything

2019-08-06 Thread Alexander Korotkov
Hi! On Tue, Aug 6, 2019 at 8:56 PM Tom Lane wrote: > The reason appears to be that the condition for descending through a > non-leaf index key for the RTContainedBy case is incorrectly optimistic: > it supposes that we only need to descend into subtrees whose union key > overlaps the query array.

intarray GiST index gets wrong answers for '{}' <@ anything

2019-08-06 Thread Tom Lane
While looking at the pending patch for faster GIN index searches on no-key queries, I was motivated to improve contrib/intarray's regression test to exercise the GIN_SEARCH_MODE_ALL case, because it didn't. And then I thought well, let's try to bring the code coverage of _int_gin.c up to something