- Notifications
You must be signed in to change notification settings - Fork5
Commitc1943db
committed
Fix pg_get_ruledef() so that negative numeric constants are parenthesized.
This is needed because :: casting binds more tightly than minus, so forexample -1::integer is not the same as (-1)::integer, and there are caseswhere the difference is important. In particular this caused a failurein SELECT DISTINCT ... ORDER BY ... where expressions that should havematched were seen as different by the parser; but I suspect that therecould be other cases where failure to parenthesize leads to subtlersemantic differences in reloaded rules. Per report from Alexandr Popov.1 parent700af33 commitc1943db
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
4479 | 4479 | | |
4480 | 4480 | | |
4481 | 4481 | | |
| 4482 | + | |
| 4483 | + | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
4482 | 4488 | | |
4483 | 4489 | | |
4484 | 4490 | | |
4485 | | - | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
4486 | 4495 | | |
4487 | 4496 | | |
4488 | 4497 | | |
| |||
0 commit comments
Comments
(0)