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:
Tom Lane 2019-04-10 19:02:21 -04:00
parent 765525c8c2
commit 4cae471d1b
1 changed files with 1 additions and 1 deletions

View File

@ -3236,7 +3236,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;