(2014/04/10 0:08), Tom Lane wrote:
> Kyotaro HORIGUCHI <horiguchi.kyot...@lab.ntt.co.jp> writes:
>> Oops! I found a bug in this patch. The previous v8 patch missed
>> the case that build_index_pathkeys() could build a partial
>> pathkeys from the index tlist.
> 
> TBH I think that's barely the tip of the iceberg of cases where this
> patch will get the wrong answer.

> Also, I don't see it doing anything to check the ordering
> of multiple index columns

I think that the following code in index_pathkeys_are_extensible() would
check the ordering:

+       if (!pathkeys_contained_in(pathkeys, root->query_pathkeys))
+               return false;

> Also, what's with the success return
> before the loop:
> 
> +     if (list_length(pathkeys) == list_length(root->query_pathkeys))
> +             return true;
> 
> At this point you haven't proven *anything at all* about whether the
> index columns have something to do with the query_pathkeys.

I think that the two pathkeys would be proved to be equal, if the both
conditions are satisfied.

Thanks,

Best regards,
Etsuro Fujita


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to