Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > I do agree, however, that the three Boolean flags don't make the code
> > entirely easy to read. What I might suggest is that we replace the
> > three Boolean flags with integer flags, something like this:
>
> Yeah, that's another way we could go. I had been considering a variant
> of that, which was to assign specific code values to the enum constants
> and then invent macros that did bit-anding tests on them. That ends up
> being just about what you propose except that the compiler understands
> the enum-ness of the behavioral alternatives, which seems like a good
> thing.
Isn't that what you said not to do in
https://www.postgresql.org/message-id/13345.1462383078@sss.pgh.pa.us ?
ISTM that in Robert's proposal it is allowed for a "flags" value to
have an OR'ed combination of multiple individual flags. Unless you're
proposing to enumerate each allowed combination?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services