From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Small miscellaneus fixes (Part II) |
Date: | 2022-12-21 17:51:38 |
Message-ID: | CAEudQAo5_og5xYnC7_dgoPYT1dJLg=A00Xx+P+T2JKUXeqSfMA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks for looking at this.
Em ter., 20 de dez. de 2022 às 21:51, Justin Pryzby <pryzby(at)telsasoft(dot)com>
escreveu:
> On Fri, Nov 25, 2022 at 06:27:04PM -0300, Ranier Vilela wrote:
> > 5. Use boolean operator with boolean operands
> > (b/src/backend/commands/tablecmds.c)
>
> tablecmds.c: right. Since 074c5cfbf
>
> pg_dump.c: right. Since b08dee24a
>
> > 4. Fix dead code (src/backend/utils/adt/formatting.c)
> > Np->sign == '+', is different than "!= '-'" and is different than "!=
> '+'"
> > So the else is never hit.
>
> formatting.c: I don't see the problem.
>
> if (Np->sign != '-')
> ...
> else if (Np->sign != '+' && IS_PLUS(Np->Num))
> ...
>
> You said that the "else" is never hit, but why ?
>
Maybe this part of the patch is wrong.
The only case for the first if not handled is sign == '-',
sign == '-' is handled by else.
So always the "else is true", because sign == '+' is
handled by the first if.
regards,
Ranier Vilela
From | Date | Subject | |
---|---|---|---|
Next Message | Nikita Malakhov | 2022-12-21 19:39:41 | Re: Array initialisation notation in syscache.c |
Previous Message | Tom Lane | 2022-12-21 17:46:14 | Re: Get access to the whole query in CustomScan path callback |