mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-31 10:17:22 +02:00
Fix backwards test in operator_precedence_warning logic.
Warnings about unary minus might have been wrong. It's a bit surprising that nobody noticed yet ... probably the precedence-warning feature hasn't really been used much in the field. Rikard Falkeborn Discussion: https://postgr.es/m/CADRDgG6fzA8A2oeygUw4=o7ywo4kvz26NxCSgpq22nMD73Bx4Q@mail.gmail.com
This commit is contained in:
parent
036f7d3782
commit
930930c476
@ -3154,7 +3154,7 @@ operator_precedence_group(Node *node, const char **nodename)
|
||||
*nodename = strVal(linitial(aexpr->name));
|
||||
/* Ignore if op was always higher priority than IS-tests */
|
||||
if (strcmp(*nodename, "+") == 0 ||
|
||||
strcmp(*nodename, "-"))
|
||||
strcmp(*nodename, "-") == 0)
|
||||
group = 0;
|
||||
else
|
||||
group = PREC_GROUP_PREFIX_OP;
|
||||
|
Loading…
Reference in New Issue
Block a user