forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd23ac62
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 parentd0a02bd commitd23ac62
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 | |
---|---|---|---|
| |||
1808 | 1808 |
| |
1809 | 1809 |
| |
1810 | 1810 |
| |
1811 |
| - | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
1812 | 1814 |
| |
1813 | 1815 |
| |
1814 | 1816 |
| |
| 1817 | + | |
1815 | 1818 |
| |
1816 | 1819 |
| |
1817 | 1820 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3469 | 3469 |
| |
3470 | 3470 |
| |
3471 | 3471 |
| |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
3472 | 3480 |
| |
3473 | 3481 |
| |
3474 | 3482 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1113 | 1113 |
| |
1114 | 1114 |
| |
1115 | 1115 |
| |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1116 | 1119 |
| |
1117 | 1120 |
| |
1118 | 1121 |
| |
|
0 commit comments
Comments
(0)