Skip to content

Commit 4cae471

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 765525c commit 4cae471

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
@@ -3236,7 +3236,7 @@ operator_precedence_group(Node *node, const char **nodename)
32363236
*nodename = strVal(linitial(aexpr->name));
32373237
/* Ignore if op was always higher priority than IS-tests */
32383238
if (strcmp(*nodename, "+") == 0 ||
3239-
strcmp(*nodename, "-"))
3239+
strcmp(*nodename, "-") == 0)
32403240
group = 0;
32413241
else
32423242
group = PREC_GROUP_PREFIX_OP;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy