forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6c00d2c
committed
Tidy up join_search_one_level code
The code in join_search_one_level was a bit convoluted. With a casualglance, you might think that other_rels_list was being set to somethingother than joinrels[1] when level == 2, however, joinrels[level - 1] isjoinrels[1] when level == 2, so nothing special needs to happen to setother_rels_list. Let's clean that up to avoid confusing anyone.In passing, we may as well modernize the loop inmake_rels_by_clause_joins() and instead of passing in the ListCell tostart looping from, let's just pass in the index where to start from andmake use of for_each_from(). Ever since1cff1b9, Lists are arraysunder the hood. lnext() and list_head() both seem a little too linked-listlike.Author: Alex Hsieh, David Rowley, Richard GuoReviewed-by: Julien RouhaudDiscussion:https://postgr.es/m/CANWNU8x9P9aCXGF%3DaT-A_8mLTAT0LkcZ_ySYrGbcuHzMQw2-1g%40mail.gmail.com1 parent81ccbe5 commit6c00d2c
1 file changed
+18
-37
lines changedLines changed: 18 additions & 37 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 |
| - | |
| 28 | + | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| 96 | + | |
| 97 | + | |
96 | 98 |
| |
97 | 99 |
| |
98 | 100 |
| |
| |||
106 | 108 |
| |
107 | 109 |
| |
108 | 110 |
| |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 | 111 |
| |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 |
| - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
122 | 115 |
| |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
| 116 | + | |
127 | 117 |
| |
128 | 118 |
| |
129 | 119 |
| |
| |||
167 | 157 |
| |
168 | 158 |
| |
169 | 159 |
| |
170 |
| - | |
171 |
| - | |
| 160 | + | |
172 | 161 |
| |
173 | 162 |
| |
174 | 163 |
| |
| |||
180 | 169 |
| |
181 | 170 |
| |
182 | 171 |
| |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
| 172 | + | |
| 173 | + | |
189 | 174 |
| |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 |
| - | |
| 175 | + | |
194 | 176 |
| |
195 |
| - | |
| 177 | + | |
196 | 178 |
| |
197 | 179 |
| |
198 | 180 |
| |
| |||
286 | 268 |
| |
287 | 269 |
| |
288 | 270 |
| |
289 |
| - | |
290 |
| - | |
291 |
| - | |
| 271 | + | |
| 272 | + | |
292 | 273 |
| |
293 | 274 |
| |
294 | 275 |
| |
295 | 276 |
| |
296 | 277 |
| |
297 | 278 |
| |
298 | 279 |
| |
299 |
| - | |
300 |
| - | |
| 280 | + | |
| 281 | + | |
301 | 282 |
| |
302 | 283 |
| |
303 | 284 |
| |
304 |
| - | |
| 285 | + | |
305 | 286 |
| |
306 | 287 |
| |
307 | 288 |
| |
|
0 commit comments
Comments
(0)