Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-26 Thread Andres Freund
On 2015-07-17 19:57:22 +0100, Andrew Gierth wrote: > Attached is the current version of my fix (with Jeevan's regression > tests plus one of mine). Pushed, thanks for the report and fix! -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-26 Thread Andres Freund
On 2015-07-17 11:37:26 +0530, Jeevan Chalke wrote: > However I wonder why we are supporting GROUPING SETS inside GROUPING SETS. > On Oracle, it is throwing an error. > We are not trying to be Oracle compatible, but just curious to know. The SQL specification seems to be pretty unambigous about sup

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-21 Thread Kyotaro HORIGUCHI
Hello, At Mon, 20 Jul 2015 15:45:21 +0530, Jeevan Chalke wrote in > On Sat, Jul 18, 2015 at 12:27 AM, Andrew Gierth > wrote: > > > > "Kyotaro" == Kyotaro HORIGUCHI > > writes: > > > > Kyotaro> Hello, this looks to be a kind of thinko. The attached patch > > Kyotaro> fixes it. > > > >

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-20 Thread Jeevan Chalke
On Sat, Jul 18, 2015 at 12:27 AM, Andrew Gierth wrote: > > "Kyotaro" == Kyotaro HORIGUCHI > writes: > > Kyotaro> Hello, this looks to be a kind of thinko. The attached patch > Kyotaro> fixes it. > > No, that's still wrong. Just knowing that there is a List is not enough > to tell whether t

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-17 Thread Andrew Gierth
> "Kyotaro" == Kyotaro HORIGUCHI writes: Kyotaro> Hello, this looks to be a kind of thinko. The attached patch Kyotaro> fixes it. No, that's still wrong. Just knowing that there is a List is not enough to tell whether to concat it or append it. Jeevan's original patch tries to get around

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-17 Thread Kyotaro HORIGUCHI
Hello, this looks to be a kind of thinko. The attached patch fixes it. === According to the comment of transformGroupingSet, it assumes that the given GROUPING SETS node is already flatted out and flatten_grouping_sets() does that. The details of the transformation is described in the comment for

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-16 Thread Jeevan Chalke
On Wed, Jul 15, 2015 at 10:21 PM, Andrew Gierth wrote: > > "Jeevan" == Jeevan Chalke writes: > > Jeevan> Hi, > Jeevan> It looks like we do support nested GROUPING SETS, I mean Sets > Jeevan> withing Sets, not other types. However this nesting is broken. > > Good catch, but I'm not yet su

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-15 Thread Andrew Gierth
> "Jeevan" == Jeevan Chalke writes: Jeevan> Hi, Jeevan> It looks like we do support nested GROUPING SETS, I mean Sets Jeevan> withing Sets, not other types. However this nesting is broken. Good catch, but I'm not yet sure your fix is correct; I'll need to look into that. -- Andrew (irc

[HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-15 Thread Jeevan Chalke
Hi, It looks like we do support nested GROUPING SETS, I mean Sets withing Sets, not other types. However this nesting is broken. Here is the simple example where I would expect three rows in the result. But unfortunately it is giving "unrecognized node type" error. Which is something weird and