|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.31 1999/02/21 01:55:02 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.32 1999/02/22 05:26:20 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -104,7 +104,8 @@ update_rels_pathlist_for_joins(Query *root, List *joinrels)
|
104 | 104 | lfirsti(innerrel->relids));
|
105 | 105 |
|
106 | 106 | /* need to flatten the relids list */
|
107 |
| - joinrel->relids = intAppend(outerrelids, innerrelids); |
| 107 | + joinrel->relids = nconc(listCopy(outerrelids), |
| 108 | + listCopy(innerrelids)); |
108 | 109 |
|
109 | 110 | /*
|
110 | 111 | * 1. Consider mergejoin paths where both relations must be
|
@@ -213,11 +214,11 @@ sort_inner_and_outer(RelOptInfo *joinrel,
|
213 | 214 | {
|
214 | 215 | xmergeinfo = (MergeInfo *) lfirst(i);
|
215 | 216 |
|
216 |
| - outerkeys = extract_path_keys(xmergeinfo->jmethod.jmkeys, |
| 217 | + outerkeys = make_pathkeys_from_joinkeys(xmergeinfo->jmethod.jmkeys, |
217 | 218 | outerrel->targetlist,
|
218 | 219 | OUTER);
|
219 | 220 |
|
220 |
| - innerkeys = extract_path_keys(xmergeinfo->jmethod.jmkeys, |
| 221 | + innerkeys = make_pathkeys_from_joinkeys(xmergeinfo->jmethod.jmkeys, |
221 | 222 | innerrel->targetlist,
|
222 | 223 | INNER);
|
223 | 224 |
|
@@ -352,7 +353,7 @@ match_unsorted_outer(RelOptInfo *joinrel,
|
352 | 353 | innerrel->width, false))));
|
353 | 354 | if (!path_is_cheaper_than_sort)
|
354 | 355 | {
|
355 |
| - varkeys = extract_path_keys(matchedJoinKeys, |
| 356 | + varkeys = make_pathkeys_from_joinkeys(matchedJoinKeys, |
356 | 357 | innerrel->targetlist,
|
357 | 358 | INNER);
|
358 | 359 | }
|
@@ -473,7 +474,7 @@ match_unsorted_inner(RelOptInfo *joinrel,
|
473 | 474 |
|
474 | 475 | if (temp2)
|
475 | 476 | {
|
476 |
| - List *outerkeys = extract_path_keys(matchedJoinKeys, |
| 477 | + List *outerkeys = make_pathkeys_from_joinkeys(matchedJoinKeys, |
477 | 478 | outerrel->targetlist,
|
478 | 479 | OUTER);
|
479 | 480 | List *merge_pathkeys = new_join_pathkeys(outerkeys,
|
@@ -551,10 +552,12 @@ hash_inner_and_outer(RelOptInfo *joinrel,
|
551 | 552 | foreach(i, hashinfo_list)
|
552 | 553 | {
|
553 | 554 | xhashinfo = (HashInfo *) lfirst(i);
|
554 |
| - outerkeys = extract_path_keys(((JoinMethod *) xhashinfo)->jmkeys, |
| 555 | + outerkeys = make_pathkeys_from_joinkeys( |
| 556 | + ((JoinMethod *) xhashinfo)->jmkeys, |
555 | 557 | outerrel->targetlist,
|
556 | 558 | OUTER);
|
557 |
| - innerkeys = extract_path_keys(((JoinMethod *) xhashinfo)->jmkeys, |
| 559 | + innerkeys = make_pathkeys_from_joinkeys( |
| 560 | + ((JoinMethod *) xhashinfo)->jmkeys, |
558 | 561 | innerrel->targetlist,
|
559 | 562 | INNER);
|
560 | 563 | hash_pathkeys = new_join_pathkeys(outerkeys,
|
|
0 commit comments