Re: PublicationActions - use bit flags.

Поиск
Список
Период
Сортировка
От Greg Nancarrow
Тема Re: PublicationActions - use bit flags.
Дата
Msg-id CAJcOf-f5E299LmJHDGxEY1bzU5rmAK1irrkmjcoG=-1yTtaSFQ@mail.gmail.com
обсуждение исходный текст
Ответ на PublicationActions - use bit flags.  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Mon, Dec 20, 2021 at 11:19 AM Peter Smith <smithpb2250@gmail.com> 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.
>
> PSA a small patch for this.
>
> Thoughts?
>

+1
I think the bit flags are a more natural fit, and also the patch
removes the unnecessary use of a palloc'd tiny struct to return the
PublicationActions (which also currently isn't explicitly pfree'd).


Regards,
Greg Nancarrow
Fujitsu Australia



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: simplifying foreign key/RI checks
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: row filtering for logical replication