Skip to content

Commit 99bbff5

Browse files
committed
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
1 parent 7657072 commit 99bbff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/parser/parse_expr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3145,7 +3145,7 @@ operator_precedence_group(Node *node, const char **nodename)
31453145
*nodename = strVal(linitial(aexpr->name));
31463146
/* Ignore if op was always higher priority than IS-tests */
31473147
if (strcmp(*nodename, "+") == 0 ||
3148-
strcmp(*nodename, "-"))
3148+
strcmp(*nodename, "-") == 0)
31493149
group = 0;
31503150
else
31513151
group = PREC_GROUP_PREFIX_OP;

0 commit comments

Comments
 (0)