Re: Rethinking representation of partial-aggregate steps - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Rethinking representation of partial-aggregate steps
Date
Msg-id 20160623173851.GA203183@alvherre.pgsql
Whole thread Raw
In response to Re: Rethinking representation of partial-aggregate steps  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Rethinking representation of partial-aggregate steps  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Rethinking representation of partial-aggregate steps
Next
From: Tom Lane
Date:
Subject: Re: Bug in to_timestamp().