Re: Get more from indices.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Get more from indices.
Дата
Msg-id 11242.1389128430@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Get more from indices.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Get more from indices.
Список pgsql-hackers
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> The following modification to v7 does this.

> =========
> diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
> index 380f3ba..233e21c 100644
> --- a/src/backend/optimizer/path/pathkeys.c
> +++ b/src/backend/optimizer/path/pathkeys.c
> @@ -536,7 +536,8 @@ index_pathkeys_are_extensible(PlannerInfo *root,
>          {
>              EquivalenceMember *member = (EquivalenceMember *) lfirst(lc2);
> -            if (!bms_equal(member->em_relids, index->rel->relids))
> +            if (!bms_equal(member->em_relids, index->rel->relids) ||
> +                !IsA(member, Var))
>                  continue;
>              else
>              {
> ==========

I'm pretty sure that IsA test prevents the optimization from ever firing.

But aside from hasty typos, is there enough left of this optimization to
be worth the complication?
        regards, tom lane



В списке pgsql-hackers по дате отправления: