(Before PostgreSQL 8.2, the containment operators @> and <@ 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 data types!)

The operators &&, @> and <@ are
equivalent to PostgreSQL's
built-in operators of the same names, except that they work only on
integer arrays that do not contain nulls, while the built-in
operators work for any array type. This restriction makes them
faster than the built-in operators in many cases.

The @@ and ~~
operators test whether an array satisfies a query, which is expressed as a value of a
specialized data type query_int. A query consists of integer values that are checked
against the elements of the array, possibly combined using the
operators & (AND), | (OR), and ! (NOT).
Parentheses can be used as needed. For example, the query
1&(2|3) matches arrays that contain 1
and also contain either 2 or 3.

intarray provides index support for
the &&, @>, <@, and
@@ operators, as well as regular array
equality.

Two GiST index operator classes are provided: gist__int_ops (used by default) is suitable for
small- to medium-size data sets, while 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.

There is also a non-default GIN operator class gin__int_ops supporting the same operators.

The choice between GiST and GIN indexing depends on the relative
performance characteristics of GiST and GIN, which are discussed
elsewhere. As a rule of thumb, a GIN index is faster to search than
a GiST index, but slower to build or update; so GIN is better
suited for static data and GiST for often-updated data.