Re: Change definitions of bitmap flags to bit-shifting style

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change definitions of bitmap flags to bit-shifting style
Date: 2020-12-06 01:31:09
Message-ID: 20201206013109.GA25661@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Dec-05, Tom Lane wrote:

> FWIW, personally I'd vote for doing the exact opposite. When you are
> debugging and examining the contents of a bitmask variable, it's easier to
> correlate a value like "0x03" with definitions made in the former style.
> Or at least I think so; maybe others see it differently.

The hexadecimal representation is more natural to me than bit-shifting,
so I would prefer to use that style too. But maybe I'm trained to it
because of looking at t_infomask symbols constantly.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-12-06 01:33:46 Re: A few new options for CHECKPOINT
Previous Message Tom Lane 2020-12-05 20:40:23 Re: [PATCH] Keeps tracking the uniqueness with UniqueKey