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

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 20:23:12
Message-ID: CAHOFxGpW7JkX8HGW4MFFrSagCdW08yM-DK1jZvRJnj7dp84m=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> Yeah, because it's an exact datatype match while the core operator
> is anyarray && anyarray which is not.

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. I've added gin index on a column declared as type "integer array"
and had expected the index to be used, but I did not test it yet since
there is some bad data with NULLs stored as a value in the integer array
and I am waiting on that data cleanup to be done before directly using &&
operator. I expect that when I do test it, I will be impacted by this same
concern. It is simplest to change the column type from integer array to
anyarray? Is there a con to doing so?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message PegoraroF10 2019-02-28 20:23:46 Refresh Publication takes hours and doesn´t finish
Previous Message David G. Johnston 2019-02-28 19:27:56 Re: specifying table in function args