summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-04-05 00:40:35 +0000
committerTom Lane2009-04-05 00:40:35 +0000
commit0e3978d0b4dd8a6a929eeca04659b37d8727bdef (patch)
tree1ee3587955914ff679713802d2b610ae4332096f
parent81d7d3d5036e185a48795be10ec976a994f0d7a2 (diff)
Remove contrib/intarray's definitions of the <@ and @> operators, so that they
don't cause confusion with the built-in anyarray versions of those operators. Adjust the module's index opclasses to support the built-in operators in place of the private ones. The private implementations are still available under their historical names @ and ~, so no functionality is lost. Some quick testing suggests that they offer no real benefit over the core operators, however. Per a complaint from Rusty Conover.
-rw-r--r--contrib/intarray/_int.sql.in44
-rw-r--r--contrib/intarray/uninstall__int.sql4
-rw-r--r--doc/src/sgml/intarray.sgml30
3 files changed, 39 insertions, 39 deletions
diff --git a/contrib/intarray/_int.sql.in b/contrib/intarray/_int.sql.in
index afdd98652c..1c4f060183 100644
--- a/contrib/intarray/_int.sql.in
+++ b/contrib/intarray/_int.sql.in
@@ -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 @>,
- OPERATOR 8 <@,
+ OPERATOR 7 @> (anyarray, anyarray),
+ OPERATOR 8 <@ (anyarray, anyarray),
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 @>,
- OPERATOR 8 <@,
+ OPERATOR 7 @> (anyarray, anyarray),
+ OPERATOR 8 <@ (anyarray, anyarray),
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 @>,
- OPERATOR 8 <@,
+ OPERATOR 7 @> (anyarray, anyarray),
+ OPERATOR 8 <@ (anyarray, anyarray),
OPERATOR 13 @,
OPERATOR 14 ~,
OPERATOR 20 @@ (_int4, query_int),
diff --git a/contrib/intarray/uninstall__int.sql b/contrib/intarray/uninstall__int.sql
index f2ac1a24a6..1523521854 100644
--- a/contrib/intarray/uninstall__int.sql
+++ b/contrib/intarray/uninstall__int.sql
@@ -91,10 +91,6 @@ DROP FUNCTION icount(_int4);
DROP FUNCTION intset(int4);
-DROP OPERATOR <@ (_int4, _int4);
-
-DROP OPERATOR @> (_int4, _int4);
-
DROP OPERATOR ~ (_int4, _int4);
DROP OPERATOR @ (_int4, _int4);
diff --git a/doc/src/sgml/intarray.sgml b/doc/src/sgml/intarray.sgml
index f482432f87..95bc41475d 100644
--- a/doc/src/sgml/intarray.sgml
+++ b/doc/src/sgml/intarray.sgml
@@ -134,12 +134,12 @@
<entry>overlap &mdash; <literal>true</> if arrays have at least one common element</entry>
</row>
<row>
- <entry><literal>int[] @&gt; int[]</literal></entry>
+ <entry><literal>int[] @ int[]</literal></entry>
<entry><type>boolean</type></entry>
<entry>contains &mdash; <literal>true</> if left array contains right array</entry>
</row>
<row>
- <entry><literal>int[] &lt;@ int[]</literal></entry>
+ <entry><literal>int[] ~ int[]</literal></entry>
<entry><type>boolean</type></entry>
<entry>contained &mdash; <literal>true</> if left array is contained in right array</entry>
</row>
@@ -203,11 +203,13 @@
</table>
<para>
- (Before PostgreSQL 8.2, the containment operators @&gt; and &lt;@ were
- respectively called @ and ~. These names are still available, but are
- deprecated and will eventually be retired. Notice that the old names
- are reversed from the convention formerly followed by the core geometric
- datatypes!)
+ The containment operators <literal>@</> and <literal>~</> are functionally
+ equivalent to <productname>PostgreSQL</>'s built-in operators
+ <literal>@&gt;</> and <literal>&lt;@</>, respectively, except that
+ <literal>@</> and <literal>~</> work only on integer arrays. These
+ operator names are deprecated and will eventually be retired. (Notice that
+ these names are reversed from the convention formerly followed by the core
+ geometric datatypes!)
</para>
<para>
@@ -228,10 +230,10 @@
<para>
<filename>intarray</> provides index support for the
- <literal>&amp;&amp;</>, <literal>@&gt;</>, <literal>&lt;@</>,
- and <literal>@@</> operators, as well as regular array equality.
- The implementation uses an RD-tree data structure with
- built-in lossy compression.
+ <literal>&amp;&amp;</>, <literal>@</>, <literal>~</>,
+ and <literal>@@</> operators, as well as regular array equality
+ and the built-in <literal>@&gt;</> and <literal>&lt;@</> operators
+ (when used on integer arrays).
</para>
<para>
@@ -241,11 +243,13 @@
<literal>gist__intbig_ops</> uses a larger signature and is more
suitable for indexing large data sets (i.e., columns containing
a large number of distinct array values).
+ The implementation uses an RD-tree data structure with
+ built-in lossy compression.
</para>
<para>
There is also a non-default GIN operator class
- <literal>gin__int_ops</>.
+ <literal>gin__int_ops</> supporting the same operators.
</para>
<para>
@@ -304,7 +308,7 @@ SELECT message.mid FROM message WHERE message.sections @@ '1&amp;2'::query_int;
<title>Authors</title>
<para>
- All work was done by Teodor Sigaev (<email>[email protected]</email>) and
+ All work was done by Teodor Sigaev (<email>[email protected]</email>) and
Oleg Bartunov (<email>[email protected]</email>). See
<ulink url="http://www.sai.msu.su/~megera/postgres/gist"></ulink> for
additional information. Andrey Oktyabrski did a great work on adding new