Re: Final Patch for GROUPING SETS - unrecognized node type: 347 - Mailing list pgsql-hackers

From Erik Rijkers
Subject Re: Final Patch for GROUPING SETS - unrecognized node type: 347
Date
Msg-id 14490819f585c0575747068db5a797d9.squirrel@webmail.xs4all.nl
Whole thread Raw
In response to Re: Final Patch for GROUPING SETS - unrecognized node type: 347  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
On Tue, August 26, 2014 14:24, Andrew Gierth wrote:
>>>>>> "Erik" == Erik Rijkers <er@xs4all.nl> 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.  Excluding that contrib-patch and
>  Erik> only applying these three:
>
>  Erik> gsp1.patch
>  Erik> gsp2.patch
>  Erik> gsp-doc.patch
>
>  Erik> does indeed work (applies, compiles).
>
> I put up a rebased contrib patch anyway (linked off the CF).
>
> Did the "unrecognized node type" error go away, or do we still need to
> look into that?
>

Yes, it did go away; looks fine now:
select brand , size , grouping(brand, size) , sum(sales) from items_sold group by rollup(brand, size) ;brand | size |
grouping| sum
 
-------+------+----------+-----Bar   | L    |        0 |   5Bar   | M    |        0 |  15Bar   |      |        1 |
20Foo  | L    |        0 |  10Foo   | M    |        0 |  20Foo   |      |        1 |  30      |      |        3 |  50
 
(7 rows)


I'm a bit unclear why the bottom-row 'grouping' value is 3.  Shouldn't that be 2?

But I'm still reading the documentation so it's perhaps too early to ask...

Thanks,

Erik Rijkers





pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Patch to support SEMI and ANTI join removal
Next
From: Heikki Linnakangas
Date:
Subject: Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements