Re: Small miscellaneus fixes (Part II)
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2022-12-21T00:51:34Z
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
Commits
-
Remove redundant relkind check
- 15eb1228800a 16.0 landed
-
Remove dead code in formatting.c
- e29c5653434e 16.0 landed
-
Fix operator typo in tablecmds.c
- 01be9d498fa4 16.0 landed