Re: GROUPING

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: GROUPING
Дата
Msg-id 1183.1432147309@sss.pgh.pa.us
обсуждение исходный текст
Ответ на GROUPING  (David Fetter <david@fetter.org>)
Ответы Re: GROUPING  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Re: GROUPING  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
David Fetter <david@fetter.org> writes:
> While kicking the tires on the new GROUPING() feature, I noticed that
> NUMERIC has no cast to bit(n).  GROUPING() produces essentially a
> bitmap, although the standard mandates for some reason that it be a
> numeric type.

> I was thinking it should produce NUMERIC rather than int4 as it does
> now in order to accommodate large numbers of columns, but the
> usefulness of the bitmap is greatly increased if there's a simple CAST
> to bit(n).

Maybe INT8 would be a better choice than INT4?  But I'm not sure there's
any practical use-case for more than 30 grouping sets anyway.  Keep in
mind the actual output volume probably grows like 2^N.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: jsonb concatenate operator's semantics seem questionable
Следующее
От: Ryan Pedela
Дата:
Сообщение: Re: jsonb concatenate operator's semantics seem questionable