|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.125 2009/09/18 17:24:51 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/optimizer/path/joinpath.c,v 1.126 2009/09/19 17:48:09 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -155,18 +155,18 @@ add_paths_to_joinrel(PlannerInfo *root, |
155 | 155 | } |
156 | 156 |
|
157 | 157 | /* |
158 | | - * clause_matches_join |
| 158 | + * clause_sides_match_join |
159 | 159 | * Determine whether a join clause is of the right form to use in this join. |
160 | 160 | * |
161 | 161 | * We already know that the clause is a binary opclause referencing only the |
162 | 162 | * rels in the current join. The point here is to check whether it has the |
163 | 163 | * form "outerrel_expr op innerrel_expr" or "innerrel_expr op outerrel_expr", |
164 | | - * rather than mixing outer and inner vars on either side. If it is usable, |
| 164 | + * rather than mixing outer and inner vars on either side. If it matches, |
165 | 165 | * we set the transient flag outer_is_left to identify which side is which. |
166 | 166 | */ |
167 | 167 | static inline bool |
168 | | -clause_matches_join(RestrictInfo *rinfo, RelOptInfo *outerrel, |
169 | | - RelOptInfo *innerrel) |
| 168 | +clause_sides_match_join(RestrictInfo *rinfo, RelOptInfo *outerrel, |
| 169 | + RelOptInfo *innerrel) |
170 | 170 | { |
171 | 171 | if (bms_is_subset(rinfo->left_relids, outerrel->relids) && |
172 | 172 | bms_is_subset(rinfo->right_relids, innerrel->relids)) |
@@ -267,7 +267,7 @@ join_is_removable(PlannerInfo *root, |
267 | 267 | /* |
268 | 268 | * Check if clause has the form "outer op inner" or "inner op outer". |
269 | 269 | */ |
270 | | - if (!clause_matches_join(restrictinfo, outerrel, innerrel)) |
| 270 | + if (!clause_sides_match_join(restrictinfo, outerrel, innerrel)) |
271 | 271 | continue; /* no good for these input relations */ |
272 | 272 |
|
273 | 273 | /* OK, add to list */ |
@@ -1009,7 +1009,7 @@ hash_inner_and_outer(PlannerInfo *root, |
1009 | 1009 | /* |
1010 | 1010 | * Check if clause has the form "outer op inner" or "inner op outer". |
1011 | 1011 | */ |
1012 | | - if (!clause_matches_join(restrictinfo, outerrel, innerrel)) |
| 1012 | + if (!clause_sides_match_join(restrictinfo, outerrel, innerrel)) |
1013 | 1013 | continue; /* no good for these input relations */ |
1014 | 1014 |
|
1015 | 1015 | hashclauses = lappend(hashclauses, restrictinfo); |
@@ -1186,7 +1186,7 @@ select_mergejoin_clauses(PlannerInfo *root, |
1186 | 1186 | /* |
1187 | 1187 | * Check if clause has the form "outer op inner" or "inner op outer". |
1188 | 1188 | */ |
1189 | | - if (!clause_matches_join(restrictinfo, outerrel, innerrel)) |
| 1189 | + if (!clause_sides_match_join(restrictinfo, outerrel, innerrel)) |
1190 | 1190 | { |
1191 | 1191 | have_nonmergeable_joinclause = true; |
1192 | 1192 | continue; /* no good for these input relations */ |
|
0 commit comments