Re: PublicationActions - use bit flags.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PublicationActions - use bit flags.
Дата
Msg-id 2185490.1640824592@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PublicationActions - use bit flags.  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
Peter Smith <smithpb2250@gmail.com> writes:
> On Thu, Dec 30, 2021 at 3:30 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
>> +       if (pubform->pubinsert) pub->pubactions |= PUBACTION_INSERT;
>> This is usually written like:
>> pub->pubactions |= (pubform->pubinsert ? PUBACTION_INSERT : 0)

> Thanks for the info, I've modified those assignment styles as suggested.

FWIW, I think it's utter nonsense to claim that the second way is
preferred over the first.  There may be some people who think
the second way is more legible, but I don't; and I'm pretty sure
that the first way is significantly more common in the PG codebase.

            regards, tom lane



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

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: PublicationActions - use bit flags.
Следующее
От: Thomas Munro
Дата:
Сообщение: Tests "with" and "alter_table" suffer from name clash