forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit52fc007
committed
Avoid a premature coercion failure in transformSetOperationTree() when
presented with an UNKNOWN-type Var, which can happen in cases where anunknown literal appeared in a subquery. While many such cases will faillater on anyway in the planner, there are some cases where the planner isable to flatten the query and replace the Var by the constant before it hasto coerce the union column to the final type. I had added this check in 8.4to provide earlier/better error detection, but it causes a regression forsome cases that worked OK before. Fix by not making the check if the inputnode is UNKNOWN type and not a Const or Param. If it isn't going to work,it will fail anyway at plan time, with the only real loss being inability toprovide an error cursor. Per gripe from Britt Piehler.In passing, rename a couple of variables to remove confusion from aninner scope masking the same variable names in an outer scope.1 parentff49961 commit52fc007
3 files changed
+71
-20
lines changedLines changed: 37 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
1533 | 1533 |
| |
1534 | 1534 |
| |
1535 | 1535 |
| |
1536 |
| - | |
1537 |
| - | |
1538 |
| - | |
1539 |
| - | |
1540 |
| - | |
1541 |
| - | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
1542 | 1542 |
| |
1543 |
| - | |
| 1543 | + | |
1544 | 1544 |
| |
1545 | 1545 |
| |
1546 | 1546 |
| |
1547 | 1547 |
| |
1548 | 1548 |
| |
1549 |
| - | |
| 1549 | + | |
1550 | 1550 |
| |
1551 | 1551 |
| |
1552 | 1552 |
| |
| |||
1555 | 1555 |
| |
1556 | 1556 |
| |
1557 | 1557 |
| |
1558 |
| - | |
1559 |
| - | |
1560 |
| - | |
1561 |
| - | |
1562 |
| - | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
1563 | 1580 |
| |
1564 | 1581 |
| |
1565 |
| - | |
1566 |
| - | |
1567 |
| - | |
1568 |
| - | |
1569 |
| - | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
1570 | 1587 |
| |
1571 | 1588 |
| |
1572 | 1589 |
| |
| |||
1584 | 1601 |
| |
1585 | 1602 |
| |
1586 | 1603 |
| |
1587 |
| - | |
| 1604 | + | |
1588 | 1605 |
| |
1589 | 1606 |
| |
1590 | 1607 |
| |
|
Lines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
433 | 433 |
| |
434 | 434 |
| |
435 | 435 |
| |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + |
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
156 | 166 |
| |
| 167 | + | |
| 168 | + |
0 commit comments
Comments
(0)