Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTXE1-0005wC-0s for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Jul 2017 17:39:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dTXE0-0005uJ-DZ for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Jul 2017 17:39:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dTXDJ-0004f7-EY for pgsql-bugs@postgresql.org; Fri, 07 Jul 2017 17:38:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dTXDF-0008GP-RA for pgsql-bugs@postgresql.org; Fri, 07 Jul 2017 17:38:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v67HcdlH021099; Fri, 7 Jul 2017 13:38:39 -0400 From: Tom Lane To: Grzegorz Grabek cc: pgsql-bugs@postgresql.org Subject: Re: GIN index not working for integer[] if there is more then one column in table In-reply-to: References: Comments: In-reply-to Grzegorz Grabek message dated "Fri, 07 Jul 2017 19:19:42 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21097.1499449119.1@sss.pgh.pa.us> Date: Fri, 07 Jul 2017 13:38:39 -0400 Message-ID: <21098.1499449119@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Grzegorz Grabek 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