Re: Suspicious strcmp() in src/backend/parser/parse_expr.c

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <david.rowley@2ndquadrant.com>, Andrew Gierth <andrew@tao11.riddles.org.uk>, Rikard Falkeborn <rikard.falkeborn@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-04-12T00:58:57Z
Lists: pgsql-bugs
On Thu, Apr 11, 2019 at 10:12:06AM -0400, Tom Lane wrote:
> I'll bet a nickel that that's pgindent's fault.  It probably thinks
> that "decimal" is a typedef (greps typedefs.list ... yes), and that
> tends to result in funny space-omissions later in the line.

Yes, I can see as well that pgindent complains here.  As that would
result in more noise on follow-up pgindent runs, I am not changing
this one.
--
Michael

Commits

  1. Fix more strcmp() calls using boolean-like comparisons for result checks

  2. Fix backwards test in operator_precedence_warning logic.