forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9807b9a
committed
Avoid creating a RESULT RTE that's marked LATERAL.
Commit7266d09 added code to pull up simple constant functionresults, converting the RTE_FUNCTION RTE to a dummy RTE_RESULTRTE since it no longer need be scanned. But I forgot to clearthe LATERAL flag if the RTE has it set. If the function reducedto a constant, it surely contains no lateral references so thissimplification is logically OK. It's needed because various otherplaces will Assert that RESULT RTEs aren't LATERAL.Per bug #17097 from Yaoguang Chen. Back-patch to v13 where thefaulty code came in.Discussion:https://postgr.es/m/17097-3372ef9f798fc94f@postgresql.org1 parent55cccdf commit9807b9a
File tree
3 files changed
+15
-1
lines changed- src
- backend/optimizer/prep
- test/regress
- expected
- sql
3 files changed
+15
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1802 | 1802 |
| |
1803 | 1803 |
| |
1804 | 1804 |
| |
1805 |
| - | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1806 | 1808 |
| |
1807 | 1809 |
| |
1808 | 1810 |
| |
| 1811 | + | |
1809 | 1812 |
| |
1810 | 1813 |
| |
1811 | 1814 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3414 | 3414 |
| |
3415 | 3415 |
| |
3416 | 3416 |
| |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
3417 | 3425 |
| |
3418 | 3426 |
| |
3419 | 3427 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1099 | 1099 |
| |
1100 | 1100 |
| |
1101 | 1101 |
| |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1102 | 1105 |
| |
1103 | 1106 |
| |
1104 | 1107 |
| |
|
0 commit comments
Comments
(0)