Re: Final Patch for GROUPING SETS

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Marti Raudsepp <marti(at)juffo(dot)org>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tv(at)fuzzy(dot)cz>, Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Subject: Re: Final Patch for GROUPING SETS
Date: 2014-09-18 00:21:35
Message-ID: 541A258F.7070701@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/17/2014 03:02 PM, Marti Raudsepp wrote:
> So instead of:
> GroupAggregate
> Output: four, ten, hundred, count(*)
> Grouping Sets: (onek.four, onek.ten, onek.hundred), (onek.four,
> onek.ten), (onek.four), ()
>
> Perhaps print:
> Grouping Sets: (onek.four, onek.ten, onek.hundred)
> (onek.four, onek.ten)
> (onek.four)
> ()

So:

Grouping Sets: [
[ onek.four, onek.ten, onek.hundred ],
[ onek.four, onek.ten ],
[ onek.four ],
[]
]

.. in JSON?

Seems to me that we need a better way to display the grand total
grouping set.

>
> Or maybe:
> Grouping Set: (onek.four, onek.ten, onek.hundred)
> Grouping Set: (onek.four, onek.ten)
> Grouping Set: (onek.four)
> Grouping Set: ()

The latter won't work with JSON and YAML output.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-09-18 00:22:48 Re: Immediate standby promotion
Previous Message Robert Haas 2014-09-18 00:16:37 Re: Collations and Replication; Next Steps