forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1d98fda
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 parent5620ec8 commit1d98fda
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 | |
---|---|---|---|
| |||
1801 | 1801 |
| |
1802 | 1802 |
| |
1803 | 1803 |
| |
1804 |
| - | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
1805 | 1807 |
| |
1806 | 1808 |
| |
1807 | 1809 |
| |
| 1810 | + | |
1808 | 1811 |
| |
1809 | 1812 |
| |
1810 | 1813 |
| |
|
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)