Re: Overloaded && operator from intarray module prevents index usage.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Overloaded && operator from intarray module prevents index usage.
Date: 2019-02-28 22:34:20
Message-ID: 1650.1551393260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Lewis <mlewis(at)entrata(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-02-28 22:50:01 Re: race condition when checking uniqueness between two tables
Previous Message David G. Johnston 2019-02-28 22:07:48 Re: specifying table in function args