Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzUG6-0007lq-6i for pgsql-general@arkaria.postgresql.org; Thu, 28 Feb 2019 22:34:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gzUG4-0000r5-Qm for pgsql-general@arkaria.postgresql.org; Thu, 28 Feb 2019 22:34:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzUG4-0000qx-Et for pgsql-general@lists.postgresql.org; Thu, 28 Feb 2019 22:34:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzUG1-0006gN-Tu for pgsql-general@postgresql.org; Thu, 28 Feb 2019 22:34:27 +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 x1SMYK1L001651; Thu, 28 Feb 2019 17:34:20 -0500 From: Tom Lane To: Michael Lewis cc: Thomas Kellerer , pgsql-general Subject: Re: Overloaded && operator from intarray module prevents index usage. In-reply-to: References: <10517.1551372290@sss.pgh.pa.us> Comments: In-reply-to Michael Lewis message dated "Thu, 28 Feb 2019 13:23:12 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1649.1551393260.1@sss.pgh.pa.us> Date: Thu, 28 Feb 2019 17:34:20 -0500 Message-ID: <1650.1551393260@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Lewis writes: > Can you dumb down how to change the index or column type such that an index > will be used for the && operator while intarray extension is installed? We > have the intarray extension installed and I doubt that I can get it > removed. There's no magic nice solution to this, or we'd have told you about it. Possible options: 1. Remove intarray extension. 2. Move intarray extension to a schema that's not in your search path. 3. Create an index using intarray's opclass, instead of or in addition to the core-opclass index. 4. Rename intarray's && operator to something else (will bite you at next dump/reload, where the renaming will be lost). 5. Always schema-qualify references to the core && operator. All of these have obvious downsides, especially if you're actively using the intarray extension for other purposes. regards, tom lane