Patch of intarray module in v7.4.1 - Mailing list pgsql-patches

From Korea PostgreSQL Users' Group
Subject Patch of intarray module in v7.4.1
Date
Msg-id 20040108062553.GA12342@postgresql.or.kr
Whole thread Raw
Responses Re: Patch of intarray module in v7.4.1
List pgsql-patches
In 7.4.1, intarray module have a problme about equal operator (=).

  select * from table where intarray_column = '{}';

above query make error.
because when not equal operator (<>) is made,
this make incorrect equal operator by implicate.

so, I patched.
Patch content is here.

===== BEGIN of FILE =====
--- _int.sql.in.orig    Thu Jun 12 03:44:15 2003
+++ _int.sql.in    Wed Jan  7 13:14:37 2004
@@ -140,15 +140,15 @@
 --    SORT2 = '<'
 --);

-CREATE OPERATOR <> (
-    LEFTARG = _int4,
-    RIGHTARG = _int4,
-    PROCEDURE = _int_different,
-    COMMUTATOR = '<>',
-    NEGATOR = '=',
-    RESTRICT = neqsel,
-    JOIN = neqjoinsel
-);
+--CREATE OPERATOR <> (
+--    LEFTARG = _int4,
+--    RIGHTARG = _int4,
+--    PROCEDURE = _int_different,
+--    COMMUTATOR = '<>',
+--    NEGATOR = '=',
+--    RESTRICT = neqsel,
+--    JOIN = neqjoinsel
+--);

 CREATE OPERATOR @ (
     LEFTARG = _int4,
@@ -343,7 +343,7 @@
 CREATE OPERATOR CLASS gist__int_ops
 DEFAULT FOR TYPE _int4 USING gist AS
     OPERATOR    3    &&,
-    OPERATOR    6    =    RECHECK,
+    OPERATOR    6    = (anyarray, anyarray)    RECHECK,
     OPERATOR    7    @,
     OPERATOR    8    ~,
     OPERATOR    20    @@ (_int4, query_int),
@@ -418,7 +418,7 @@
 FOR TYPE _int4 USING gist
 AS
     OPERATOR    3    &&    RECHECK,
-    OPERATOR    6    =    RECHECK,
+    OPERATOR    6    = (anyarray, anyarray)    RECHECK,
     OPERATOR    7    @    RECHECK,
     OPERATOR    8    ~    RECHECK,
     OPERATOR    20    @@ (_int4, query_int)    RECHECK,
===== End of FILE =====

pgsql-patches by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: SIGPIPE handling
Next
From: Zach Irmen
Date:
Subject: Re: psql \i handling ~ in specified file name