- Notifications
You must be signed in to change notification settings - Fork5
Commit05104f6
committed
Fix grammar's AND/OR flattening to work with operator_precedence_warning.
It'd be good for "(x AND y) AND z" to produce a three-child AND nodewhether or not operator_precedence_warning is on, but that failed tohappen when it's on because makeAndExpr() didn't look through the addedAEXPR_PAREN node. This has no effect on generated plans because prepqual.cwould flatten the AND nest anyway; but it does affect the number of parensprinted in ruleutils.c, for example. I'd already fixed some similarhazards in parse_expr.c in commitabb1646, but didn't think to searchgram.y for problems of this ilk. Per gripe from Jean-Pierre Pelletier.Report: <fa0535ec6d6428cfec40c7e8a6d11156@mail.gmail.com>1 parentd50183c commit05104f6
1 file changed
+16
-4
lines changedLines changed: 16 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14643 | 14643 |
| |
14644 | 14644 |
| |
14645 | 14645 |
| |
| 14646 | + | |
| 14647 | + | |
| 14648 | + | |
| 14649 | + | |
| 14650 | + | |
| 14651 | + | |
14646 | 14652 |
| |
14647 |
| - | |
| 14653 | + | |
14648 | 14654 |
| |
14649 |
| - | |
| 14655 | + | |
14650 | 14656 |
| |
14651 | 14657 |
| |
14652 | 14658 |
| |
| |||
14660 | 14666 |
| |
14661 | 14667 |
| |
14662 | 14668 |
| |
| 14669 | + | |
| 14670 | + | |
| 14671 | + | |
| 14672 | + | |
| 14673 | + | |
| 14674 | + | |
14663 | 14675 |
| |
14664 |
| - | |
| 14676 | + | |
14665 | 14677 |
| |
14666 |
| - | |
| 14678 | + | |
14667 | 14679 |
| |
14668 | 14680 |
| |
14669 | 14681 |
| |
|
0 commit comments
Comments
(0)