- Notifications
You must be signed in to change notification settings - Fork5
Commitc82037e
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 parent8355897 commitc82037e
1 file changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14512 | 14512 | | |
14513 | 14513 | | |
14514 | 14514 | | |
| 14515 | + | |
| 14516 | + | |
| 14517 | + | |
| 14518 | + | |
| 14519 | + | |
| 14520 | + | |
14515 | 14521 | | |
14516 | | - | |
| 14522 | + | |
14517 | 14523 | | |
14518 | | - | |
| 14524 | + | |
14519 | 14525 | | |
14520 | 14526 | | |
14521 | 14527 | | |
| |||
14529 | 14535 | | |
14530 | 14536 | | |
14531 | 14537 | | |
| 14538 | + | |
| 14539 | + | |
| 14540 | + | |
| 14541 | + | |
| 14542 | + | |
| 14543 | + | |
14532 | 14544 | | |
14533 | | - | |
| 14545 | + | |
14534 | 14546 | | |
14535 | | - | |
| 14547 | + | |
14536 | 14548 | | |
14537 | 14549 | | |
14538 | 14550 | | |
| |||
0 commit comments
Comments
(0)