- Notifications
You must be signed in to change notification settings - Fork5
Commit49ed392
committed
While doing the final setrefs.c pass over a plan tree, try to match up
non-Var sort/group expressions using ressortgroupref labels instead ofdepending entirely on equal()-ity of the upper node's tlist expressionsto the lower node's. This avoids emitting the wrong outputs in caseswhere there are textually identical volatile sort/group expressions,as for exampleselect distinct random(),random() from generate_series(1,10);Per report from Andrew Gierth.Backpatch to 8.4. Arguably this is wrong all the way back, but the only knowncase where there's an observable problem is when using hash aggregation toimplement DISTINCT, which is new as of 8.4. So for the moment I'll refrainfrom backpatching further.1 parent66363e8 commit49ed392
1 file changed
+67
-5
lines changedLines changed: 67 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 |
| |
105 | 109 |
| |
106 | 110 |
| |
| |||
1197 | 1201 |
| |
1198 | 1202 |
| |
1199 | 1203 |
| |
1200 |
| - | |
1201 |
| - | |
1202 |
| - | |
1203 |
| - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1204 | 1223 |
| |
1205 | 1224 |
| |
1206 | 1225 |
| |
| |||
1444 | 1463 |
| |
1445 | 1464 |
| |
1446 | 1465 |
| |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
1447 | 1509 |
| |
1448 | 1510 |
| |
1449 | 1511 |
| |
|
0 commit comments
Comments
(0)