forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commiteb145fd
committed
Fix dumping of outer joins with empty qual lists.
Normally, a JoinExpr would have empty "quals" only if it came from CROSSJOIN syntax. However, it's possible to get to this state by specifyingNATURAL JOIN between two tables with no common column names, and theremight be other ways too. The code previously printed no ON clause if"quals" was empty; that's right for CROSS JOIN but syntactically invalidif it's some type of outer join. Fix by printing ON TRUE in that case.This got broken by commit2ffa740, which stopped using NATURAL JOINsyntax in ruleutils output due to its brittleness in the face ofcolumn renamings. Back-patch to 9.3 where that commit appeared.Per report from Tushar Ahuja.Discussion:https://postgr.es/m/98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com1 parent3cb29c4 commiteb145fd
File tree
3 files changed
+44
-0
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+44
-0
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10082 | 10082 |
| |
10083 | 10083 |
| |
10084 | 10084 |
| |
| 10085 | + | |
| 10086 | + | |
| 10087 | + | |
| 10088 | + | |
| 10089 | + | |
10085 | 10090 |
| |
10086 | 10091 |
| |
10087 | 10092 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1648 | 1648 |
| |
1649 | 1649 |
| |
1650 | 1650 |
| |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1651 | 1680 |
| |
1652 | 1681 |
| |
1653 | 1682 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
559 | 559 |
| |
560 | 560 |
| |
561 | 561 |
| |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
562 | 572 |
| |
563 | 573 |
| |
564 | 574 |
| |
|
0 commit comments
Comments
(0)