Re: Small miscellaneus fixes (Part II)

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small miscellaneus fixes (Part II)
Date: 2022-12-21 00:51:34
Message-ID: 20221221005134.GJ1153@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 ?
What if sign is 0 ?

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-12-21 01:07:02 Re: Perform streaming logical transactions by background workers and parallel apply
Previous Message Thomas Munro 2022-12-21 00:33:20 Re: Array initialisation notation in syscache.c