From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Rethinking representation of partial-aggregate steps
Date: Thu, 23 Jun 2016 13:38:51 -0400
Message-ID: <20160623173851.GA203183@alvherre.pgsql> (raw)
In-Reply-To: <31354.1466702701@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, david.rowley@2ndquadrant.com
Subject: Re: Rethinking representation of partial-aggregate steps
In-Reply-To: <20160623173851.GA203183@alvherre.pgsql>
References: <31354.1466702701@sss.pgh.pa.us> <20160623173851.GA203183@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox