- Notifications
You must be signed in to change notification settings - Fork28
Commitd016763
committed
Disallow SRFs when considering sorts below Gather Merge
While we do allow SRFs in ORDER BY, scan/join processing should notconsider such cases - such sorts should only happen via final Sort atopa ProjectSet. So make sure we don't try adding such sorts below GatherMerge, just like we do for expressions that are volatile and/or notparallel safe.Backpatch to PostgreSQL 13, where this code was introduced as part ofthe Incremental Sort patch.Author: James ColemanReviewed-by: Tomas VondraBackpatch-through: 13Discussion:https://postgr.es/m/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.comDiscussion:https://postgr.es/m/295524.1606246314%40sss.pgh.pa.us1 parent38d30a1 commitd016763
File tree
5 files changed
+26
-5
lines changed- src
- backend/optimizer
- path
- util
- include/optimizer
- test/regress
- expected
- sql
5 files changed
+26
-5
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
837 | 837 |
| |
838 | 838 |
| |
839 | 839 |
| |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
840 | 847 |
| |
841 | 848 |
| |
842 | 849 |
| |
|
Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 | 24 |
| |
30 | 25 |
| |
31 | 26 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 |
| |
28 | 33 |
| |
29 | 34 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1620 | 1620 |
| |
1621 | 1621 |
| |
1622 | 1622 |
| |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + |
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
| 270 | + | |
| 271 | + |
0 commit comments
Comments
(0)