I found other issue :( postgres=# select name, place from cars group by grouping sets(name, place,()); name | place -------+------------ bmw | skoda | opel | | germany | czech rep. skoda | czech rep. skoda | germany bmw | czech rep. bmw | germany opel | czech rep. opel | germany (11 rows)
postgres=# explain select name, place from cars group by grouping sets(name, place,()); QUERY PLAN ------------------------------------------------------------------------------ Append (cost=36.98..88.55 rows=1230 width=54) CTE GroupingSets -> Seq Scan on cars (cost=0.00..18.30 rows=830 width=68) -> HashAggregate (cost=18.68..20.68 rows=200 width=32) -> CTE Scan on "GroupingSets" (cost=0.00..16.60 rows=830 width=32) -> HashAggregate (cost=18.68..20.68 rows=200 width=32) -> CTE Scan on "GroupingSets" (cost=0.00..16.60 rows=830 width=32) -> CTE Scan on "GroupingSets" (cost=0.00..16.60 rows=830 width=64) (8 rows) the combination of nonagregates and empty sets do a problems - because we can't ensure agg mode without aggregates or group by. But it is only minor issue 2010/8/5 Joshua Tolley <eggyk...@gmail.com>: > On Thu, Aug 05, 2010 at 04:46:51PM +0200, Pavel Stehule wrote: >> So Joshua, can you look on code? > > Sure... thanks :) > > -- > Joshua Tolley / eggyknap > End Point Corporation > http://www.endpoint.com > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkxa1NsACgkQRiRfCGf1UMPwzQCgjz52P86Yx4ac4aRkKwjn8OHK > 6/EAoJ/CjXEyPaLpx39SI5bKQPz+AwBR > =Mi2J > -----END PGP SIGNATURE----- > > -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers