mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Revert my patch of 2009-04-04 that removed contrib/intarray's definitions of
the <@ and @> operators. These are not in fact equivalent to the built-in anyarray operators of the same names, because they have different behavior for empty arrays, namely they don't think empty arrays are contained in anything. That is mathematically wrong, no doubt, but until we can persuade GIN indexes to implement the mathematical definition we should probably not change this. Another reason for not changing it now is that we can't yet ensure the opclasses will be updated correctly in a dump-and-reload upgrade. Per recent discussions.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/contrib/intarray/_int.sql.in,v 1.30 2009/04/05 00:40:35 tgl Exp $ */
|
||||
/* $PostgreSQL: pgsql/contrib/intarray/_int.sql.in,v 1.31 2009/06/07 20:09:34 tgl Exp $ */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
@ -152,23 +152,23 @@ CREATE OPERATOR && (
|
||||
-- JOIN = neqjoinsel
|
||||
--);
|
||||
|
||||
--CREATE OPERATOR @> (
|
||||
-- LEFTARG = _int4,
|
||||
-- RIGHTARG = _int4,
|
||||
-- PROCEDURE = _int_contains,
|
||||
-- COMMUTATOR = '<@',
|
||||
-- RESTRICT = contsel,
|
||||
-- JOIN = contjoinsel
|
||||
--);
|
||||
CREATE OPERATOR @> (
|
||||
LEFTARG = _int4,
|
||||
RIGHTARG = _int4,
|
||||
PROCEDURE = _int_contains,
|
||||
COMMUTATOR = '<@',
|
||||
RESTRICT = contsel,
|
||||
JOIN = contjoinsel
|
||||
);
|
||||
|
||||
--CREATE OPERATOR <@ (
|
||||
-- LEFTARG = _int4,
|
||||
-- RIGHTARG = _int4,
|
||||
-- PROCEDURE = _int_contained,
|
||||
-- COMMUTATOR = '@>',
|
||||
-- RESTRICT = contsel,
|
||||
-- JOIN = contjoinsel
|
||||
--);
|
||||
CREATE OPERATOR <@ (
|
||||
LEFTARG = _int4,
|
||||
RIGHTARG = _int4,
|
||||
PROCEDURE = _int_contained,
|
||||
COMMUTATOR = '@>',
|
||||
RESTRICT = contsel,
|
||||
JOIN = contjoinsel
|
||||
);
|
||||
|
||||
-- obsolete:
|
||||
CREATE OPERATOR @ (
|
||||
@ -365,8 +365,8 @@ CREATE OPERATOR CLASS gist__int_ops
|
||||
DEFAULT FOR TYPE _int4 USING gist AS
|
||||
OPERATOR 3 &&,
|
||||
OPERATOR 6 = (anyarray, anyarray),
|
||||
OPERATOR 7 @> (anyarray, anyarray),
|
||||
OPERATOR 8 <@ (anyarray, anyarray),
|
||||
OPERATOR 7 @>,
|
||||
OPERATOR 8 <@,
|
||||
OPERATOR 13 @,
|
||||
OPERATOR 14 ~,
|
||||
OPERATOR 20 @@ (_int4, query_int),
|
||||
@ -442,8 +442,8 @@ FOR TYPE _int4 USING gist
|
||||
AS
|
||||
OPERATOR 3 &&,
|
||||
OPERATOR 6 = (anyarray, anyarray),
|
||||
OPERATOR 7 @> (anyarray, anyarray),
|
||||
OPERATOR 8 <@ (anyarray, anyarray),
|
||||
OPERATOR 7 @>,
|
||||
OPERATOR 8 <@,
|
||||
OPERATOR 13 @,
|
||||
OPERATOR 14 ~,
|
||||
OPERATOR 20 @@ (_int4, query_int),
|
||||
@ -473,8 +473,8 @@ FOR TYPE _int4 USING gin
|
||||
AS
|
||||
OPERATOR 3 &&,
|
||||
OPERATOR 6 = (anyarray, anyarray),
|
||||
OPERATOR 7 @> (anyarray, anyarray),
|
||||
OPERATOR 8 <@ (anyarray, anyarray),
|
||||
OPERATOR 7 @>,
|
||||
OPERATOR 8 <@,
|
||||
OPERATOR 13 @,
|
||||
OPERATOR 14 ~,
|
||||
OPERATOR 20 @@ (_int4, query_int),
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/contrib/intarray/uninstall__int.sql,v 1.11 2009/04/05 00:40:35 tgl Exp $ */
|
||||
/* $PostgreSQL: pgsql/contrib/intarray/uninstall__int.sql,v 1.12 2009/06/07 20:09:34 tgl Exp $ */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
@ -91,6 +91,10 @@ DROP FUNCTION icount(_int4);
|
||||
|
||||
DROP FUNCTION intset(int4);
|
||||
|
||||
DROP OPERATOR <@ (_int4, _int4);
|
||||
|
||||
DROP OPERATOR @> (_int4, _int4);
|
||||
|
||||
DROP OPERATOR ~ (_int4, _int4);
|
||||
|
||||
DROP OPERATOR @ (_int4, _int4);
|
||||
|
Reference in New Issue
Block a user