Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-10 Thread Andrew Gierth
> "Tomas" == Tomas Vondra writes: Tomas> If we can get rid of the excessive ChainAggregate, that's Tomas> certainly enough for now. I found an algorithm that should provably give the minimal number of sorts (I was afraid that problem would turn out to be NP-hard, but not so - it's solvable

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-07 Thread Tomas Vondra
On 7.9.2014 18:52, Andrew Gierth wrote: >> "Tomas" == Tomas Vondra writes: > > Tomas> Maybe preventing this completely (i.e. raising an ERROR with > Tomas> "duplicate columns in CUBE/ROLLUP/... clauses") would be > Tomas> appropriate. Does the standard says anything about this? > > The spe

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-07 Thread Andrew Gierth
> "Tomas" == Tomas Vondra writes: >> As for computing it all twice, there's currently no attempt to >> optimize multiple identical grouping sets into multiple >> projections of a single grouping set result. CUBE(a,b,c,a) has >> twice as many grouping sets as CUBE(a,b,c) does, even though

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-07 Thread Tomas Vondra
On 7.9.2014 15:11, Andrew Gierth wrote: >> "Tomas" == Tomas Vondra writes: > > >> It's not one sort per grouping set, it's the minimal number of > >> sorts needed to express the result as a union of ROLLUP > >> clauses. The planner code will (I believe) always find the > >> smallest numbe

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-07 Thread Andrew Gierth
> "Tomas" == Tomas Vondra writes: >> It's not one sort per grouping set, it's the minimal number of >> sorts needed to express the result as a union of ROLLUP >> clauses. The planner code will (I believe) always find the >> smallest number of sorts needed. Tomas> You're probably right.

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-07 Thread Tomas Vondra
On 6.9.2014 23:34, Andrew Gierth wrote: >> "Tomas" == Tomas Vondra writes: > > Tomas> I have significant doubts about the whole design, > Tomas> though. Especially the decision not to use HashAggregate, > > There is no "decision not to use HashAggregate". There is simply no > support for H

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-06 Thread Andrew Gierth
> "Tomas" == Tomas Vondra writes: Tomas> I have significant doubts about the whole design, Tomas> though. Especially the decision not to use HashAggregate, There is no "decision not to use HashAggregate". There is simply no support for HashAggregate yet. Having it be able to work with Gro

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-09-06 Thread Tomas Vondra
On 31.8.2014 22:52, Andrew Gierth wrote: > Recut patches: > > gsp1.patch - phase 1 code patch (full syntax, limited functionality) > gsp2.patch - phase 2 code patch (adds full functionality using the > new chained aggregate mechanism) > gsp-doc.patch - doc

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-31 Thread Atri Sharma
On Sunday, August 31, 2014, Andres Freund wrote: > On 2014-08-31 21:09:59 +0530, Atri Sharma wrote: > > On Sun, Aug 31, 2014 at 9:07 PM, Erik Rijkers > wrote: > > > I have found that the "unrecognized node type" error is caused by: > > It's a warning, not an error, right? > > > > shared_preload_

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-31 Thread Andres Freund
On 2014-08-31 21:09:59 +0530, Atri Sharma wrote: > On Sun, Aug 31, 2014 at 9:07 PM, Erik Rijkers wrote: > > I have found that the "unrecognized node type" error is caused by: It's a warning, not an error, right? > > shared_preload_libraries = pg_stat_statements > > > > in postgresql.conf (as my

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-31 Thread Atri Sharma
On Sun, Aug 31, 2014 at 9:07 PM, Erik Rijkers wrote: > On Tue, August 26, 2014 14:24, Andrew Gierth wrote: > >> "Erik" == Erik Rijkers writes: > > > > >> They apply cleanly for me at 2bde297 whether with git apply or > > >> patch, except for the contrib one (which you don't need unless you

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-31 Thread Erik Rijkers
On Tue, August 26, 2014 14:24, Andrew Gierth wrote: >> "Erik" == Erik Rijkers writes: > > >> They apply cleanly for me at 2bde297 whether with git apply or > >> patch, except for the contrib one (which you don't need unless you > >> want to run the contrib regression tests without applying

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-26 Thread Erik Rijkers
On Tue, August 26, 2014 14:24, Andrew Gierth wrote: >> "Erik" == Erik Rijkers writes: > > >> They apply cleanly for me at 2bde297 whether with git apply or > >> patch, except for the contrib one (which you don't need unless you > >> want to run the contrib regression tests without applying

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-26 Thread Andrew Gierth
> "Erik" == Erik Rijkers writes: >> They apply cleanly for me at 2bde297 whether with git apply or >> patch, except for the contrib one (which you don't need unless you >> want to run the contrib regression tests without applying the >> gsp-u patch). Erik> Ah, I had not realised that.

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-26 Thread Erik Rijkers
On Tue, August 26, 2014 11:13, Andrew Gierth wrote: >> "Andrew" == Andrew Gierth writes: > >> "Erik" == Erik Rijkers writes: > > Erik> The patches did not apply anymore so I applied at 73eba19aebe0. > Erik> There they applied OK, and make && make check was OK. > > Andrew> I'll look and

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-26 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: > "Erik" == Erik Rijkers writes: Erik> The patches did not apply anymore so I applied at 73eba19aebe0. Erik> There they applied OK, and make && make check was OK. Andrew> I'll look and rebase if need be. They apply cleanly for me at 2bde297 wheth

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-26 Thread Andrew Gierth
> "Erik" == Erik Rijkers writes: Erik> The patches did not apply anymore so I applied at 73eba19aebe0. Erik> There they applied OK, and make && make check was OK. I'll look and rebase if need be. --> WARNING: unrecognized node type: 347 Can't reproduce this - are you sure it's not a mi

Re: [HACKERS] Final Patch for GROUPING SETS - unrecognized node type: 347

2014-08-26 Thread Erik Rijkers
On Mon, August 25, 2014 07:21, Andrew Gierth wrote: > Here is the new version of our grouping sets patch. This version > supersedes the previous post. The patches did not apply anymore so I applied at 73eba19aebe0. There they applied OK, and make && make check was OK. drop table if exists it