Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-04-21 Thread Andrew Gierth
Svenne == Svenne Krap sve...@krap.dk writes: Svenne I have the explains, Can you post the explain analyze outputs? If need be, you can anonymize the table and column names and any identifiers by using the anonymization option of explain.depesz.com, but please only do that if you actually need

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-04-20 Thread Svenne Krap
Oh, and I build it on top of f92fc4c95ddcc25978354a8248d3df22269201bc On 20-04-2015 10:36, Svenne Krap wrote: The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant:

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-04-20 Thread Svenne Krap
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed Hi, I have (finally) found time to review this. The syntax

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-04-12 Thread Michael Paquier
On Sun, Apr 12, 2015 at 2:26 PM, 彭瑞华 ruihua.p...@163.com wrote: I am using postgesql 9.4.0. Thanks for your great work on grouping sets patch effort. I am now compiling postgresql from source code 9.4.0 on Linux platform with [gsp-all.patch] successed and grouping function well, but failed on

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-04-12 Thread 彭瑞华
ok, I will try it using git master branch source code. thanks! Of course, using gsp-all-latest.patch this time. At 2015-04-12 14:23:46, Michael Paquier michael.paqu...@gmail.com wrote: On Sun, Apr 12, 2015 at 2:26 PM, 彭瑞华 ruihua.p...@163.com wrote: I am using postgesql 9.4.0. Thanks for your

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-04-11 Thread 彭瑞华
Dear: I am using postgesql 9.4.0. Thanks for your great work on grouping sets patch effort. I am now compiling postgresql from source code 9.4.0 on Linux platform with [gsp-all.patch] successed and grouping function well, but failed on window platform(windows 2003 or window 7). It shows

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-03-27 Thread Svenne Krap
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 18-03-2015 17:18, Svenne Krap wrote: I still need to check against the standard and I will run it against a non-trivival production load... hopefully I will finish up my review shortly after the weekend... I am still on it, but a little

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-03-26 Thread Andrew Gierth
Svenne == Svenne Krap sve...@krap.dk writes: Svenne I still need to check against the standard and I will run it Svenne against a non-trivival production load... hopefully I will Svenne finish up my review shortly after the weekend... Thanks for the review so far; any progress? I'm quite

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-03-18 Thread Svenne Krap
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed This is a midway review, a later will complete it. The patch

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-03-13 Thread Svenne Krap
Patch from message (87d24iukc5@news-spur.riddles.org.uk) fails (tried to apply on top of ebc0f5e01d2f ), as b55722692 has broken up the line (in src/backend/optimizer/util/pathnode.c): pathnode-path.rows = estimate_num_groups(root, uniq_exprs, rel-rows); After patching the added parameter

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-09-09 Thread Robert Haas
On Thu, Aug 21, 2014 at 11:01 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Heikki == Heikki Linnakangas hlinnakan...@vmware.com writes: Heikki Uh, that's ugly. The EXPLAIN out I mean; as an implementation Heikki detail chaining the nodes might be reasonable. But the above Heikki

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-09-09 Thread Robert Haas
On Tue, Sep 9, 2014 at 11:19 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-09-09 16:01 GMT+02:00 Robert Haas robertmh...@gmail.com: On Thu, Aug 21, 2014 at 11:01 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Heikki == Heikki Linnakangas hlinnakan...@vmware.com writes: Heikki

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-09-09 Thread Pavel Stehule
2014-09-09 16:01 GMT+02:00 Robert Haas robertmh...@gmail.com: On Thu, Aug 21, 2014 at 11:01 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Heikki == Heikki Linnakangas hlinnakan...@vmware.com writes: Heikki Uh, that's ugly. The EXPLAIN out I mean; as an implementation Heikki

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-09-09 Thread Andrew Gierth
Robert == Robert Haas robertmh...@gmail.com writes: Robert Sure, showing the sort and aggregation steps is fine. But I Robert don't see what advantage we get out of showing them like Robert this: Robert Aggregate Robert - Sort Robert- ChainAggregate Robert - Sort Robert

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-09-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Sep 9, 2014 at 12:01 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Honestly, ChainAggregate is _trivial_ compared to trying to make the GroupAggregate code deal with multiple inputs, or trying to make some new sort of plumbing node to

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-09-09 Thread Robert Haas
On Tue, Sep 9, 2014 at 12:01 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Robert == Robert Haas robertmh...@gmail.com writes: Robert Sure, showing the sort and aggregation steps is fine. But I Robert don't see what advantage we get out of showing them like Robert this: Robert

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-09-09 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: Honestly, ChainAggregate is _trivial_ compared to trying to make the GroupAggregate code deal with multiple inputs, or trying to make some new sort of plumbing node to feed input to those sorts. (You'd think that it should be possible to use

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-27 Thread Robert Haas
On Mon, Aug 25, 2014 at 1:35 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: If you look at the latest patch post, there's a small patch in it that does nothing but unreserve the keywords and fix ruleutils to make deparse/parse work. The required fix to ruleutils is an example of

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-24 Thread Andrew Gierth
Robert == Robert Haas robertmh...@gmail.com writes: Robert I can accept ugly code, but I feel strongly that we shouldn't Robert accept ugly semantics. Forcing cube to get out of the way Robert may not be pretty, but I think it will be much worse if we Robert violate the rule that quoting a

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: Tom Perhaps so. I would really prefer not to have to get into Tom estimating how many people will be inconvenienced how badly. Tom It's clear to me that not a lot of sweat has been put into Tom seeing if we can avoid reserving the keyword, and I

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Stephen Frost
* Andrew Gierth (and...@tao11.riddles.org.uk) wrote: Having now spent some more time looking, I believe there is a solution which makes it unreserved which does not require any significant pain in the code. I'm not entirely convinced that this is the right approach in the long term, but it

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Alvaro Herrera
Andrew Gierth wrote: (This of course means that if someone has a cube() function call in a group by clause of a view, then upgrading will change the meaning of the view and possibly fail to create it; there seems to be no fix for this, not even using the latest pg_dump, since pg_dump relies

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Andrew Gierth
Alvaro == Alvaro Herrera alvhe...@2ndquadrant.com writes: (This of course means that if someone has a cube() function call in a group by clause of a view, then upgrading will change the meaning of the view and possibly fail to create it; there seems to be no fix for this, not even using

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Robert Haas
On Thu, Aug 21, 2014 at 2:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: Tom == Tom Lane t...@sss.pgh.pa.us writes: Tom I wonder if you've tried hard enough to avoid reserving the keyword. GROUP BY cube(a,b) is currently legal syntax and means

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Aug 21, 2014 at 2:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, if there are any extant applications that use that exact phrasing, they're going to be broken in any case. That does not mean that we have to break every other appearance of

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Greg Stark
On Fri, Aug 22, 2014 at 7:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: So the proposal you are pushing is going to result in seriously teeing off some fraction of our userbase; and the argument why that would be acceptable seems to boil down to I think there are few enough of them that we don't

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Robert Haas
On Fri, Aug 22, 2014 at 2:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Aug 21, 2014 at 2:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, if there are any extant applications that use that exact phrasing, they're going to be broken in any case.

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Andrew Dunstan
On 08/22/2014 02:42 PM, Greg Stark wrote: On Fri, Aug 22, 2014 at 7:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: So the proposal you are pushing is going to result in seriously teeing off some fraction of our userbase; and the argument why that would be acceptable seems to boil down to I think

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Merlin Moncure
On Fri, Aug 22, 2014 at 1:52 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Aug 22, 2014 at 2:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: https://www.youtube.com/watch?v=MT2gzzbyWpw At around 8 minutes, he shows utilization statistics for cube at around 1% across their install base.

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Stephen Frost
* Andrew Dunstan (and...@dunslane.net) wrote: On 08/22/2014 02:42 PM, Greg Stark wrote: On Fri, Aug 22, 2014 at 7:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: So the proposal you are pushing is going to result in seriously teeing off some fraction of our userbase; and the argument why that

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Greg Stark
On Fri, Aug 22, 2014 at 10:37 PM, Stephen Frost sfr...@snowman.net wrote: Agreed- and how many of those have *every extension available* loaded... Actually that was also in the talk.a few slides later. 0.7% -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Stephen Frost
* Greg Stark (st...@mit.edu) wrote: On Fri, Aug 22, 2014 at 10:37 PM, Stephen Frost sfr...@snowman.net wrote: Agreed- and how many of those have *every extension available* loaded... Actually that was also in the talk.a few slides later. 0.7% So, 0.3% install cube w/o installing *every*

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: Tom I'm not convinced of that; I think some creative hackery in the Tom grammar might be able to deal with this. Making GROUP BY CUBE(a,b) parse as grouping sets rather than as a function turned out to be the easy part: give CUBE a lower precedence

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Heikki Linnakangas
On 08/13/2014 09:43 PM, Atri Sharma wrote: Sorry, forgot to attach the patch for fixing cube in contrib, which breaks since we now reserve cube keyword. Please find attached the same. Ugh, that will make everyone using the cube extension unhappy. After this patch, they will have to quote

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Andrew Gierth
Heikki == Heikki Linnakangas hlinnakan...@vmware.com writes: On 08/13/2014 09:43 PM, Atri Sharma wrote: Sorry, forgot to attach the patch for fixing cube in contrib, which breaks since we now reserve cube keyword. Please find attached the same. Heikki Ugh, that will make everyone using

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Andrew Gierth
A progress update: Atri We envisage that handling of arbitrary grouping sets will be Atri best done by having the planner generating an Append of Atri multiple aggregation paths, presumably with some way of moving Atri the original input path to a CTE. We have not really explored Atri yet

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Heikki Linnakangas
On 08/21/2014 01:28 PM, Andrew Gierth wrote: A progress update: Atri We envisage that handling of arbitrary grouping sets will be Atri best done by having the planner generating an Append of Atri multiple aggregation paths, presumably with some way of moving Atri the original input

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Tom Lane
Andrew Gierth and...@tao11.riddles.org.uk writes: Heikki == Heikki Linnakangas hlinnakan...@vmware.com writes: Heikki I think we should bite the bullet and rename the extension, I agree, the contrib/cube patch as posted is purely so we could test everything without having to argue over the

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Andrew Gierth
Heikki == Heikki Linnakangas hlinnakan...@vmware.com writes: Heikki Uh, that's ugly. The EXPLAIN out I mean; as an implementation Heikki detail chaining the nodes might be reasonable. But the above Heikki gets unreadable if you have more than a few grouping sets. It's good for highlighting

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Pavel Stehule
2014-08-21 17:00 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Andrew Gierth and...@tao11.riddles.org.uk writes: Heikki == Heikki Linnakangas hlinnakan...@vmware.com writes: Heikki I think we should bite the bullet and rename the extension, I agree, the contrib/cube patch as posted is purely so

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: I agree, the contrib/cube patch as posted is purely so we could test everything without having to argue over the new name first. Tom I wonder if you've tried hard enough to avoid reserving the keyword. GROUP BY cube(a,b) is currently legal

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Pavel Stehule
2014-08-21 17:58 GMT+02:00 Andrew Gierth and...@tao11.riddles.org.uk: Tom == Tom Lane t...@sss.pgh.pa.us writes: I agree, the contrib/cube patch as posted is purely so we could test everything without having to argue over the new name first. Tom I wonder if you've tried hard enough to

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Tom Lane
Andrew Gierth and...@tao11.riddles.org.uk writes: Tom == Tom Lane t...@sss.pgh.pa.us writes: Tom I wonder if you've tried hard enough to avoid reserving the keyword. GROUP BY cube(a,b) is currently legal syntax and means something completely incompatible to what the spec requires. Well, if

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Merlin Moncure
On Thu, Aug 21, 2014 at 1:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Gierth and...@tao11.riddles.org.uk writes: Tom == Tom Lane t...@sss.pgh.pa.us writes: Tom I wonder if you've tried hard enough to avoid reserving the keyword. GROUP BY cube(a,b) is currently legal syntax and means

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Andrew Dunstan
On 08/21/2014 02:48 PM, Merlin Moncure wrote: Basically, I'm afraid that unilaterally renaming cube is going to break enough applications that there will be more people who flat out don't want this patch than there will be who get benefit from it, and we end up voting to revert the feature

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: I'm inclined to think that the audience for this is far larger than the audience for the cube extension, which I have not once encountered in the field. Perhaps so. I would really prefer not to have to get into estimating how many people will be

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Andrew Dunstan and...@dunslane.net writes: I'm inclined to think that the audience for this is far larger than the audience for the cube extension, which I have not once encountered in the field. +1 Perhaps so. I would really prefer not to have

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread David Fetter
On Thu, Aug 21, 2014 at 06:15:33PM -0400, Stephen Frost wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Andrew Dunstan and...@dunslane.net writes: I'm inclined to think that the audience for this is far larger than the audience for the cube extension, which I have not once encountered in

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Andrew Gierth
Stephen == Stephen Frost sfr...@snowman.net writes: I'm inclined to think that the audience for this is far larger than the audience for the cube extension, which I have not once encountered in the field. Stephen +1 Most of my encounters with cube have been me suggesting it to people on