I have added an intarray column to my table and successfully added data to the column.
CREATE TABLE my_table
(
...
tag_ids integer[],
)
When I try a query like this:
SELECT id, tag_ids from my_table where tag_ids @@ ARRAY[1,2]
I get this error:
ERROR: operator does not exist: integer[] @@ integer[]
LINE 1: SELECT id, tag_ids from core_tile where tag_ids @@ ARRAY[1,2...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
I installed 9.3 via Homebrew for OS X, which I believe includes the intarray module, and like I said I added the array column and data no problem. Also this:
SELECT * FROM pg_available_extensions
...
"intarray";"1.0";"";"functions, operators, and index support for 1-D arrays of integers"
Update:
I wondered if I needed a specific index before the operators would work. In the example in the docs they add an index like this:
CREATE INDEX my_index ON my_table USING GIST (tag_ids gist__int_ops);
But when I run that I get:
ERROR: operator class "gist__int_ops" does not exist for access method "gist"
Am I missing an extension or is something wrong with the query or what?