forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit77a94c3
committed
Fix missed step in removal of useless RESULT RTEs in the planner.
Commit4be058f forgot that the append_rel_list would already bepopulated at the time we remove useless result RTEs, and it might containPlaceHolderVars that need to be adjusted like the ones in the main parsetree. This could lead to "no relation entry for relid N" failures lateron, when the planner tries to do something with an unadjusted PHV.Per report from Tom Ellis. Back-patch to v12 where the bug came in.Discussion:https://postgr.es/m/20201205173056.GF30712@cloudinit-builder1 parentad3fb04 commit77a94c3
File tree
3 files changed
+59
-0
lines changed- src
- backend/optimizer/prep
- test/regress
- expected
- sql
3 files changed
+59
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3090 | 3090 |
| |
3091 | 3091 |
| |
3092 | 3092 |
| |
| 3093 | + | |
3093 | 3094 |
| |
3094 | 3095 |
| |
3095 | 3096 |
| |
|
Lines changed: 36 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3330 | 3330 |
| |
3331 | 3331 |
| |
3332 | 3332 |
| |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
3333 | 3369 |
| |
3334 | 3370 |
| |
3335 | 3371 |
| |
|
Lines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1052 | 1052 |
| |
1053 | 1053 |
| |
1054 | 1054 |
| |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1055 | 1077 |
| |
1056 | 1078 |
| |
1057 | 1079 |
| |
|
0 commit comments
Comments
(0)