Re: Rethinking representation of partial-aggregate steps

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: Rethinking representation of partial-aggregate steps
Дата
Msg-id
20160623180112.GA204252@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps Robert Haas <robertmhaas@gmail.com>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps David Rowley <david.rowley@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps David Rowley <david.rowley@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps David Rowley <david.rowley@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps David Rowley <david.rowley@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Re: Rethinking representation of partial-aggregate steps David Rowley <david.rowley@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps Robert Haas <robertmhaas@gmail.com>
Re: Rethinking representation of partial-aggregate steps Simon Riggs <simon@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps David Rowley <david.rowley@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps David Rowley <david.rowley@2ndquadrant.com>
Re: Rethinking representation of partial-aggregate steps Tom Lane <tgl@sss.pgh.pa.us>
Tom Lane wrote:

> What I'm imagining is, say,
> 
> #define AGGOP_COMBINESTATES   0x1
> #define AGGOP_SERIALIZESTATES  0x2
> #define AGGOP_DESERIALIZESTATES  0x4
> #define AGGOP_FINALIZEAGGS 0x8
> 
> typedef enum AggPartialMode
> {
>   AGGPARTIAL_SIMPLE = AGGOP_FINALIZEAGGS,
>   AGGPARTIAL_PARTIAL = AGGOP_SERIALIZESTATES,
>   AGGPARTIAL_FINAL = AGGOP_COMBINESTATES | AGGOP_DESERIALIZESTATES | AGGOP_FINALIZEAGGS
> } AggPartialMode;
> 
> #define DO_AGGPARTIAL_COMBINE(apm)  (((apm) & AGGOP_COMBINESTATES) != 0)
> #define DO_AGGPARTIAL_SERIALIZE(apm)  (((apm) & AGGOP_SERIALIZESTATES) != 0)
> #define DO_AGGPARTIAL_DESERIALIZE(apm)  (((apm) & AGGOP_DESERIALIZESTATES) != 0)
> #define DO_AGGPARTIAL_FINALIZE(apm)  (((apm) & AGGOP_FINALIZEAGGS) != 0)
> 
> 
> These enum constants satisfy the properties I mentioned before, but their
> assigned values are chosen to make the macros cheap.

Ah, sure, that makes sense.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
Сообщение: Re: Bug in to_timestamp().
От: Tom Lane
Дата:
Сообщение: Re: Bug in to_timestamp().
FAQ