From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Rethinking representation of partial-aggregate steps |
Date: | 2016-06-23 17:38:51 |
Message-ID: | 20160623173851.GA203183@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-06-23 17:40:55 | Re: Bug in to_timestamp(). |
Previous Message | Robert Haas | 2016-06-23 17:31:08 | Re: Rethinking representation of partial-aggregate steps |