Re: PublicationActions - use bit flags.

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PublicationActions - use bit flags.
Date: 2021-12-20 13:58:06
Message-ID: 3b7f2bdd-77ed-00d7-437c-dd9c37e6a2fa@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20.12.21 01:18, Peter Smith wrote:
> For some reason the current HEAD PublicationActions is a struct of
> boolean representing combinations of the 4 different "publication
> actions".
>
> I felt it is more natural to implement boolean flag combinations using
> a bitmask instead of a struct of bools. IMO using the bitmask also
> simplifies assignment and checking of said flags.

I don't see why this is better. It just makes the code longer and adds
more punctuation and reduces type safety.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-12-20 14:05:15 Re: Getting rid of regression test input/ and output/ files
Previous Message Peter Eisentraut 2021-12-20 13:53:46 Re: Column Filtering in Logical Replication