- Notifications
You must be signed in to change notification settings - Fork5.3k
Commit2e7469d
committed
Don't assume a subquery's output is unique if there's a SRF in its tlist.
While the x output of "select x from t group by x" can be presumed unique,this does not hold for "select x, generate_series(1,10) from t group by x",because we may expand the set-returning function after the grouping step.(Perhaps that should be re-thought; but considering all the other odditiesinvolved with SRFs in targetlists, it seems unlikely we'll change it.)Put a check in query_is_distinct_for() so it's not fooled by such cases.Back-patch to all supported branches.David Rowley1 parente78791e commit2e7469d
File tree
3 files changed
+32
-0
lines changed- src
- backend/optimizer/util
- test/regress
- expected
- sql
3 files changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
1093 | 1094 | | |
1094 | 1095 | | |
1095 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1096 | 1108 | | |
1097 | 1109 | | |
1098 | 1110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
0 commit comments
Comments
(0)