Re: Selectivity estimation for intarray

From: Oleg Bartunov <obartunov(at)gmail(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Selectivity estimation for intarray
Date: 2015-04-29 12:59:56
Message-ID: CAF4Au4wd9MUfquxsu7boX6_g1-r6qUhCziZhvSn9d2gUnwLy-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Any chance to have this patch in 9.5 ? Many intarray users will be happy.

On Wed, Apr 29, 2015 at 1:48 PM, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
wrote:

> Hackers,
>
> currently built-in &&, @>, <@ array operators have selectivity estimations
> while same operator in intarray contrib haven't them. Problem is that
> operators in intarray contrib still use contsel and contjoinsel functions
> for selectivity estimation even when built-in operators receive their
> specific selectivity estimations.
>
> Attached patch adds selectivity estimation functions to &&, @>, <@
> operators in intarray contrib. In order to have less code duplication they
> are just wrappers over built-in selectivity estimation functions.
>
> However, I faced a problem of migration scripts. Currently, ALTER OPERATOR
> can only change owner and schema of operator not operator parameters
> themselves. Change pg_operator directly is also not an option. At first, it
> would be kludge. At second, in order to correctly find corresponding
> operator in pg_operator migration script need to know schema where
> extension is installed. But it can't refer @extschema@ because extension
> is relocatable.
>
> My proposal is to let ALTER OPERATOR change restrict and join selectivity
> functions of the operator. Also it would be useful to be able to change
> commutator and negator of operator: extension could add commutators and
> negators in further versions. Any thoughts?
>
> ------
> With best regards,
> Alexander Korotkov.
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-04-29 13:03:28 Re: pg_rewind test race condition..?
Previous Message Michael Paquier 2015-04-29 12:01:36 Re: shared_libperl, shared_libpython