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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-08-06T18:42:46Z
Lists: pgsql-hackers
Alexander Korotkov <a.korotkov@postgrespro.ru> 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 either unpatched or patched intarray code; and also with
some future version that doesn't consider <@ indexable at all.

			regards, tom lane



Commits

  1. Remove <@ from contrib/intarray's GiST operator classes.

  2. Fix intarray's GiST opclasses to not fail for empty arrays with <@.