From: Pavel Stehule on
2010/8/3 Joshua Tolley <eggyknap(a)gmail.com>:
> On Tue, Aug 03, 2010 at 12:58:03PM -0700, David Fetter wrote:
>> On Mon, Aug 02, 2010 at 11:50:00PM -0600, Josh Tolley wrote:
>> > In case anyone's interested, I've taken the CTE-based grouping sets
>> > patch from [1] and made it apply to 9.1, attached. I haven't yet
>> > done things like checked it for whitespace consistency, style
>> > conformity, or anything else, but (tuits permitting) hope to figure
>> > out how it works and get it closer to commitability in some upcoming
>> > commitfest.
>> >
>> > I mention it here so that if someone else is working on it, we can
>> > avoid duplicated effort, and to see if a CTE-based grouping sets
>> > implementation is really the way we think we want to go.
>> >
>> > [1]
>> > http://archives.postgresql.org/pgsql-hackers/2009-05/msg00700.php
>>
>> I've added back one file in the patch enclosed here.  I'm still
>> getting compile fails from
>>
>> CC="ccache gcc" ./configure     --prefix=$PG_PREFIX     --with-pgport=$PGPORT     --with-perl     --with-libxml     --enable-debug     --enable-cassert
>> make
>>
>> Log from that also enclosed.
>>
>
> Yeah, I seem to have done a poor job of producing the patch based on the
> repository I was working from. That said, it seems Pavel's working actively on
> a patch anyway, so perhaps my updating the old one isn't all that worthwhile.
> Pavel, is your code somewhere that we can get to it?
>

not now. please wait a week.

Regards

Pavel

> --
> Joshua Tolley / eggyknap
> End Point Corporation
> http://www.endpoint.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkxYeiQACgkQRiRfCGf1UMPlEQCff+I4sCGtR+lzUs6Wb5JKi7Uu
> 3qYAnjLHzHzyMSHHX55QsphkaBbEJ0Zf
> =uRqV
> -----END PGP SIGNATURE-----
>
>

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Joshua Tolley on
On Wed, Aug 04, 2010 at 04:44:05AM +0200, Pavel Stehule wrote:
> > Yeah, I seem to have done a poor job of producing the patch based on the
> > repository I was working from. That said, it seems Pavel's working actively on
> > a patch anyway, so perhaps my updating the old one isn't all that worthwhile.
> > Pavel, is your code somewhere that we can get to it?
> >
>
> not now. please wait a week.

That works for me. I'm glad to try doing a better job of putting together my
version of the patch, if anyone thinks it's useful, but it seems that since
Pavel's code is due to appear sometime in the foreseeable future, there's not
much point in my doing that.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
From: Pavel Stehule on
2010/8/4 Joshua Tolley <eggyknap(a)gmail.com>:
> On Wed, Aug 04, 2010 at 04:44:05AM +0200, Pavel Stehule wrote:
>> > Yeah, I seem to have done a poor job of producing the patch based on the
>> > repository I was working from. That said, it seems Pavel's working actively on
>> > a patch anyway, so perhaps my updating the old one isn't all that worthwhile.
>> > Pavel, is your code somewhere that we can get to it?
>> >
>>
>> not now. please wait a week.
>
> That works for me. I'm glad to try doing a better job of putting together my
> version of the patch, if anyone thinks it's useful, but it seems that since
> Pavel's code is due to appear sometime in the foreseeable future, there's not
> much point in my doing that.
>

I hope, so next week you can do own work on this job - I am not a
native speaker, and my code will need a checking and fixing comments

Regards

Pavel

> --
> Joshua Tolley / eggyknap
> End Point Corporation
> http://www.endpoint.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkxZkp8ACgkQRiRfCGf1UMMUcwCfcPayQbWRUYwhpCF1f24LsdD9
> H/gAnRzCEq6yLX/RVLLi88ROhurOzbhK
> =gUPx
> -----END PGP SIGNATURE-----
>
>

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Joshua Tolley on
On Thu, Aug 05, 2010 at 06:21:18AM +0200, Pavel Stehule wrote:
> I hope, so next week you can do own work on this job - I am not a
> native speaker, and my code will need a checking and fixing comments

I haven't entirely figured out how the code in the old patch works, but I
promise I *can* edit comments/docs :)

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
From: Pavel Stehule on
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 <eggyknap(a)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(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers