pgindent && weirdness
От
Alvaro Herrera
Тема
pgindent && weirdness
Дата
Msg-id
20200114221814.GA19630@alvherre.pgsql
Список
Дерево обсуждения
pgindent && weirdness Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Bruce Momjian <bruce@momjian.us>
Re: pgindent && weirdness Thomas Munro <thomas.munro@gmail.com>
Re: pgindent && weirdness Thomas Munro <thomas.munro@gmail.com>
Re: pgindent && weirdness Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgindent && weirdness Michael Paquier <michael@paquier.xyz>
Re: pgindent && weirdness Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Thomas Munro <thomas.munro@gmail.com>
Re: pgindent && weirdness Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgindent && weirdness Thomas Munro <thomas.munro@gmail.com>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Thomas Munro <thomas.munro@gmail.com>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Thomas Munro <thomas.munro@gmail.com>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Stephen Frost <sfrost@snowman.net>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
Re: pgindent && weirdness Piotr Stefaniak <postgres@piotr-stefaniak.me>
Re: pgindent && weirdness Tom Lane <tgl@sss.pgh.pa.us>
I just ran pgindent over some patch, and noticed that this hunk ended up
in my working tree:
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 861a9148ed..fff54062b0 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1405,13 +1405,13 @@ examine_opclause_expression(OpExpr *expr, Var **varp, Const **cstp, bool *varonl
if (IsA(rightop, RelabelType))
rightop = (Node *) ((RelabelType *) rightop)->arg;
- if (IsA(leftop, Var) && IsA(rightop, Const))
+ if (IsA(leftop, Var) &&IsA(rightop, Const))
{
var = (Var *) leftop;
cst = (Const *) rightop;
varonleft = true;
}
- else if (IsA(leftop, Const) && IsA(rightop, Var))
+ else if (IsA(leftop, Const) &&IsA(rightop, Var))
{
var = (Var *) rightop;
cst = (Const *) leftop;
This seems a really strange change; this
git grep '&&[^([:space:]]' -- *.c
shows that we already have a dozen or so occurrences already. (That's
ignoring execExprInterp.c's use of computed gotos.)
I don't care all that much, but wanted to throw it out in case somebody
is specifically interested in studying pgindent's logic, since the last
round of changes has yielded excellent results.
Thanks,
--
Álvaro Herrera PostgreSQL Expert, https://www.2ndQuadrant.com/
В списке pgsql-hackers по дате отправления