forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit51dfaa0
committed
Remove bogus Assert and dead code in remove_useless_results_recurse().
The JOIN_SEMI case Assert'ed that there are no PlaceHolderVars thatneed to be evaluated at the semijoin's RHS, which is wrong becausethere could be some in the semijoin's qual condition. However, therecould not be any references further up than that, and within the qualthere is not any way that such a PHV could have gone to null yet, sowe don't really need the PHV and there is no need to avoid making theRHS-removal optimization. The upshot is that there's no actual bugin production code, and we ought to just remove this misguided Assert.While we're here, also drop the JOIN_RIGHT case, which is dead codebecause reduce_outer_joins() already got rid of JOIN_RIGHT.Per bug #17700 from Xin Wen. Uselessness of the JOIN_RIGHT casepointed out by Richard Guo. Back-patch to v12 where this codewas added.Discussion:https://postgr.es/m/17700-2b5c10d917c30687@postgresql.org1 parentad86d15 commit51dfaa0
File tree
3 files changed
+39
-15
lines changed- src
- backend/optimizer/prep
- test/regress
- expected
- sql
3 files changed
+39
-15
lines changedLines changed: 9 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3251 | 3251 |
| |
3252 | 3252 |
| |
3253 | 3253 |
| |
3254 |
| - | |
3255 |
| - | |
3256 |
| - | |
3257 |
| - | |
3258 |
| - | |
3259 |
| - | |
3260 |
| - | |
3261 |
| - | |
3262 |
| - | |
3263 |
| - | |
3264 | 3254 |
| |
3265 | 3255 |
| |
3266 | 3256 |
| |
| |||
3269 | 3259 |
| |
3270 | 3260 |
| |
3271 | 3261 |
| |
3272 |
| - | |
3273 |
| - | |
3274 |
| - | |
3275 |
| - | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
3276 | 3270 |
| |
3277 | 3271 |
| |
3278 | 3272 |
| |
3279 |
| - | |
3280 | 3273 |
| |
3281 | 3274 |
| |
3282 | 3275 |
| |
| |||
3290 | 3283 |
| |
3291 | 3284 |
| |
3292 | 3285 |
| |
| 3286 | + | |
3293 | 3287 |
| |
3294 | 3288 |
| |
3295 | 3289 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3550 | 3550 |
| |
3551 | 3551 |
| |
3552 | 3552 |
| |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
| 3564 | + | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
| 3572 | + | |
3553 | 3573 |
| |
3554 | 3574 |
| |
3555 | 3575 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1156 | 1156 |
| |
1157 | 1157 |
| |
1158 | 1158 |
| |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1159 | 1169 |
| |
1160 | 1170 |
| |
1161 | 1171 |
| |
|
0 commit comments
Comments
(0)