Folks,
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).
Contravening the spec, but much more usefully, GROUPING should
probably produce a (possibly ordered) set of key-value pairs.
Alternatively, we could create something like GROUPING_JSON().
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate