Skip to content
Snippets Groups Projects
Commit 99bbff5c authored by Tom Lane's avatar Tom Lane
Browse files

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
parent 7657072e
No related branches found
No related tags found
No related merge requests found
......@@ -3145,7 +3145,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment