Re: Rethinking representation of partial-aggregate steps

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Rethinking representation of partial-aggregate steps
Дата
Msg-id 20160623173851.GA203183@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Rethinking representation of partial-aggregate steps  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Rethinking representation of partial-aggregate steps
Список 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 по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Rethinking representation of partial-aggregate steps
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug in to_timestamp().