diff options
-rw-r--r-- | contrib/intarray/Makefile | 3 | ||||
-rw-r--r-- | contrib/intarray/_int_gist.c | 6 | ||||
-rw-r--r-- | contrib/intarray/_intbig_gist.c | 6 | ||||
-rw-r--r-- | contrib/intarray/intarray--1.3--1.4.sql | 21 | ||||
-rw-r--r-- | contrib/intarray/intarray.control | 2 | ||||
-rw-r--r-- | doc/src/sgml/intarray.sgml | 5 |
6 files changed, 39 insertions, 4 deletions
diff --git a/contrib/intarray/Makefile b/contrib/intarray/Makefile index b68959ebd64..01faa36b107 100644 --- a/contrib/intarray/Makefile +++ b/contrib/intarray/Makefile @@ -12,7 +12,8 @@ OBJS = \ _intbig_gist.o EXTENSION = intarray -DATA = intarray--1.2--1.3.sql intarray--1.2.sql intarray--1.1--1.2.sql \ +DATA = intarray--1.3--1.4.sql intarray--1.2--1.3.sql \ + intarray--1.2.sql intarray--1.1--1.2.sql \ intarray--1.0--1.1.sql PGFILEDESC = "intarray - functions and operators for arrays of integers" diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index fb05b06af9e..f1817a6cce3 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -93,6 +93,12 @@ g_int_consistent(PG_FUNCTION_ARGS) break; case RTContainedByStrategyNumber: case RTOldContainedByStrategyNumber: + + /* + * This code is unreachable as of intarray 1.4, because the <@ + * operator has been removed from the opclass. We keep it for now + * to support older versions of the SQL definitions. + */ if (GIST_LEAF(entry)) retval = inner_int_contains(query, (ArrayType *) DatumGetPointer(entry->key)); diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c index 67c44e99a9a..18ecd8cda6b 100644 --- a/contrib/intarray/_intbig_gist.c +++ b/contrib/intarray/_intbig_gist.c @@ -533,6 +533,12 @@ g_intbig_consistent(PG_FUNCTION_ARGS) break; case RTContainedByStrategyNumber: case RTOldContainedByStrategyNumber: + + /* + * This code is unreachable as of intarray 1.4, because the <@ + * operator has been removed from the opclass. We keep it for now + * to support older versions of the SQL definitions. + */ if (GIST_LEAF(entry)) { int i, diff --git a/contrib/intarray/intarray--1.3--1.4.sql b/contrib/intarray/intarray--1.3--1.4.sql new file mode 100644 index 00000000000..3fbebb54173 --- /dev/null +++ b/contrib/intarray/intarray--1.3--1.4.sql @@ -0,0 +1,21 @@ +/* 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); diff --git a/contrib/intarray/intarray.control b/contrib/intarray/intarray.control index db7746b6c7a..bbc837c5732 100644 --- a/contrib/intarray/intarray.control +++ b/contrib/intarray/intarray.control @@ -1,6 +1,6 @@ # intarray extension comment = 'functions, operators, and index support for 1-D arrays of integers' -default_version = '1.3' +default_version = '1.4' module_pathname = '$libdir/_int' relocatable = true trusted = true diff --git a/doc/src/sgml/intarray.sgml b/doc/src/sgml/intarray.sgml index 9d2eb52eeb4..c8db87e97df 100644 --- a/doc/src/sgml/intarray.sgml +++ b/doc/src/sgml/intarray.sgml @@ -399,7 +399,7 @@ <para> <filename>intarray</filename> provides index support for the - <literal>&&</literal>, <literal>@></literal>, <literal><@</literal>, + <literal>&&</literal>, <literal>@></literal>, and <literal>@@</literal> operators, as well as regular array equality. </para> @@ -436,7 +436,8 @@ <para> There is also a non-default GIN operator class - <literal>gin__int_ops</literal> supporting the same operators. + <literal>gin__int_ops</literal>, which supports these operators as well + as <literal><@</literal>. </para> <para> |