Discussion:
A3 equality predicate
(too old to reply)
x4chu
2011-03-14 15:21:06 UTC
Permalink
Hi

Interesting orders may be equality predicates, which I think is List
*equi_key_list; in PlannerInfo. Correct me if I'm wrong.
So how to translate this predicate to pathkeys, since pathkeys is the
representation of interesting order.
I know we are not supposed to create new pathkeys.

Thanks
Ken Salem
2011-03-16 04:15:59 UTC
Permalink
Hi
Interesting orders may be equality predicates, which I think is List *equi_key_list; in PlannerInfo. Correct me if I'm wrong.
So how to translate this predicate to pathkeys, since pathkeys is the representation of interesting order.
I know we are not supposed to create new pathkeys.
Thanks
equi_key_list is a list of lists of pathkeys.
You can use the postgres list functions and macros (pg_list.h) to
manipulate the list(s).

-KMS
Earl Oliver
2011-03-16 04:23:39 UTC
Permalink
Hello,
Sorry for the delay in answering you. Your assumption about
equi_key_list is false.

Hint: the variable names within PlannerInfo are not ambiguous.

Earl
Post by x4chu
Hi
Interesting orders may be equality predicates, which I think is List
*equi_key_list; in PlannerInfo. Correct me if I'm wrong.
So how to translate this predicate to pathkeys, since pathkeys is the
representation of interesting order.
I know we are not supposed to create new pathkeys.
Thanks
Earl Oliver
2011-03-22 02:26:12 UTC
Permalink
Hello,
I must correct this post. My sample solution was incorrect.

equi_key_list in indeed used.

Here's some sample code to iterate through the equi_key_list structure.

ListCell* ek;
foreach(ek, root->equi_key_list)
{
List* subkeys = (List*) lfirst(ek);

ListCell* sgk;
foreach(sgk, subkeys)
{
PathKeyItem* item = (PathKeyItem*)lfirst(sgk);
}
}

I'm sorry for any confusion.

Earl
Post by Earl Oliver
Hello,
Sorry for the delay in answering you. Your assumption about
equi_key_list is false.
Hint: the variable names within PlannerInfo are not ambiguous.
Earl
Post by x4chu
Hi
Interesting orders may be equality predicates, which I think is List
*equi_key_list; in PlannerInfo. Correct me if I'm wrong.
So how to translate this predicate to pathkeys, since pathkeys is the
representation of interesting order.
I know we are not supposed to create new pathkeys.
Thanks
Continue reading on narkive:
Loading...