From: Tom Lane <tgl@sss.pgh.pa.us>
To: Grzegorz Grabek <grzegorz.grabek@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: GIN index not working for integer[] if there is more then one column in table
Date: Fri, 07 Jul 2017 13:38:39 -0400
Message-ID: <21098.1499449119@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMNzsHB1-z_Ykkxr5hYUF5337wkwE3MubSaYARAEB+9ZZzrxWw@mail.gmail.com>
References: <CAMNzsHB1-z_Ykkxr5hYUF5337wkwE3MubSaYARAEB+9ZZzrxWw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, grzegorz.grabek@gmail.com
Subject: Re: GIN index not working for integer[] if there is more then one column in table
In-Reply-To: <21098.1499449119@sss.pgh.pa.us>
References: <CAMNzsHB1-z_Ykkxr5hYUF5337wkwE3MubSaYARAEB+9ZZzrxWw@mail.gmail.com> <21098.1499449119@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox