Re: [BUGS] GIN index not working for integer[] if there is more then one column in table - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] GIN index not working for integer[] if there is more then one column in table
Date
Msg-id 21098.1499449119@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] GIN index not working for integer[] if there is more then one columnin table  (Grzegorz Grabek <grzegorz.grabek@gmail.com>)
List pgsql-bugs
Grzegorz Grabek <grzegorz.grabek@gmail.com> writes:
> I created GIN index on my table as :
> CREATE INDEX my_table_my_column_idx
> ON my_table
> USING GIN((array[mycolumn]);
> Column is integer type.
> It works pefectly fine when i use "array[my_column]=array[50]" for example.
> But when i use diffrent operators @> <@ && it doesnt use index.

I suspect you have the intarray extension installed and it is capturing
your uses of @> and <@.  intarray has its own GIN operator class which
will support its operators, but the core GIN operator class for arrays
doesn't know anything about those operators.

> Few examples when it works, and when doesn't.

The first one of these works fine for me in a vanilla installation.
I didn't try the rest ...
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Grzegorz Grabek
Date:
Subject: [BUGS] GIN index not working for integer[] if there is more then one columnin table
Next
From: Frank Gard
Date:
Subject: Re: [BUGS] BUG #14737: Wrong PL/pgSQL behaviour