From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alexander Korotkov <akorotkov(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Multirange datatypes |
Date: | 2020-12-30 18:20:36 |
Message-ID: | CAPpHfdv9Gj=3Wfjz6a7c6x=+QerSeVBvcVLGJKdK1RLYb3tXXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Wed, Dec 30, 2020 at 4:11 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alexander Korotkov <akorotkov(at)postgresql(dot)org> writes:
> > Multirange datatypes
>
> Multiple buildfarm members are issuing similar warnings about
> multirangetypes.c:
>
> calliphoridae | 2020-12-29 23:10:11 | /home/andres/build/buildfarm-calliphoridae/HEAD/pgsql.build/../pgsql/src/backend/utils/adt/multirangetypes.c:218:37: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
> calliphoridae | 2020-12-29 23:10:11 | /home/andres/build/buildfarm-calliphoridae/HEAD/pgsql.build/../pgsql/src/backend/utils/adt/multirangetypes.c:236:37: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
>
> These are evidently unhappy with code like
>
> if ...
> ...
> }
> else
> /* include it in range_str */ ;
>
> So apparently preferred style is more like
>
> else
> {
> /* include it in range_str */
> }
>
> I don't particularly care for the wording of this comment, either:
> it looks like it's describing an action that's about to be taken,
> only there's no action there. Could it say something more like
> "we already included it in range_str", or "we'll include it in
> range_str below the switch", or whatever's appropriate?
Thank you for noticing. I've slightly refactored this function in 16d531a30a.
------
Regards,
Alexander Korotkov
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-12-30 19:16:02 | pgsql: More fixups for pg_upgrade cross-version tests. |
Previous Message | Alexander Korotkov | 2020-12-30 18:17:43 | pgsql: Refactor multirange_in() |