postgresql/contrib/intarray/intarray--1.3--1.4.sql
Tom Lane 20e7e1fe31 Remove <@ from contrib/intarray's GiST operator classes.
Since commit efc77cf5f, an indexed query using <@ has required a
full-index scan, so that it actually performs worse than a plain seqscan
would do.  As I noted at the time, we'd be better off to not treat <@ as
being indexable by such indexes at all; and that's what this patch does.

It would have been difficult to remove these opclass members without
dropping the whole opclass before commit 9f9682783 fixed GiST opclass
member dependency rules, but now it's quite simple, so let's do it.

I left the existing support code in place for the time being, with
comments noting it's now unreachable.  At some point, perhaps we should
remove that code in favor of throwing an error telling people to upgrade
the extension version.

Discussion: https://postgr.es/m/2176979.1596389859@sss.pgh.pa.us
Discussion: https://postgr.es/m/458.1565114141@sss.pgh.pa.us
2020-08-08 17:26:29 -04:00

22 lines
692 B
SQL

/* contrib/intarray/intarray--1.3--1.4.sql */
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
\echo Use "ALTER EXTENSION intarray UPDATE TO '1.4'" to load this file. \quit
-- Remove <@ from the GiST opclasses, as it's not usefully indexable
-- due to mishandling of empty arrays. (It's OK in GIN.)
ALTER OPERATOR FAMILY gist__int_ops USING gist
DROP OPERATOR 8 (_int4, _int4);
ALTER OPERATOR FAMILY gist__intbig_ops USING gist
DROP OPERATOR 8 (_int4, _int4);
-- Likewise for the old spelling ~.
ALTER OPERATOR FAMILY gist__int_ops USING gist
DROP OPERATOR 14 (_int4, _int4);
ALTER OPERATOR FAMILY gist__intbig_ops USING gist
DROP OPERATOR 14 (_int4, _int4);