Re: BUG #12862: Bug in intarray extension operators (using generic selectivity estimators instead of array oriented) - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #12862: Bug in intarray extension operators (using generic selectivity estimators instead of array oriented)
Date
Msg-id 20150317191531.GE10492@momjian.us
Whole thread Raw
In response to BUG #12862: Bug in intarray extension operators (using generic selectivity estimators instead of array oriented)  (maxim.boguk@postgresql-consulting.com)
List pgsql-bugs
On Fri, Mar 13, 2015 at 02:54:56PM +0000, maxim.boguk@postgresql-consulting.com wrote:
> As you could see after installing the intarray extension PostgreSQL started
> use a general selectivity estimator.   Estimated rows=10000 before create
> extension and estimated rows=10 after, 10000 - correct one.
>
> Problem that custom (redefined) intarray && @> <@ operators are defined with
> contsel/contjoinsel instead of arraycontsel/arraycontjoinsel.
>
> However, simple change extension/intarray--1.0.sql with correct CREATE
> OPERATOR doesn't fix issue:
> test=# explain analyze select * from test where f1 && array[100];
> ERROR:  arraycontsel called for unrecognized operator 814221170
>
> I cannot find any quick fix for this issue because OID of custom && operator
> isn't fixed, so no simple change of arraycontsel/arraycontjoinsel possible.
>
> An issue exists in any version since introducing
> arraycontsel/arraycontjoinsel in 9.2 up to HEAD.

Yeah, I am not sure what to recommend here as our custom type optimizer
statistics are not as good as the built-in ones.  Did you try running
ANALYZE?

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

pgsql-bugs by date:

Previous
From: Elena Fernandez Carmona
Date:
Subject: Re: compatibilty postgres 9.2 RHEL 6.4
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #12872: Inconsistent processing of interval values