Re: WIP Patch for GROUPING SETS phase 1

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Atri Sharma <atri(dot)jiit(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP Patch for GROUPING SETS phase 1
Date: 2014-08-21 16:04:15
Message-ID: CAFj8pRBEzT7QdgtckgK6oL_-LnpkdPbFYJKrLvwgigtgvANKaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-08-21 17:58 GMT+02:00 Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>:

> >>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 syntax and means something
> completely
> incompatible to what the spec requires.
>
> GROUP BY GROUPING SETS (cube(a,b), c) -- is that cube(a,b) an expression
> to group on, or a list of grouping sets to expand?
>
> GROUP BY (cube(a,b)) -- should that be an error, or silently treat it
> as a function call rather than a grouping set? What about GROUP BY
> GROUPING SETS ((cube(a,b)) ? (both are errors in our patch)
>
> Accepting those as valid implies a degree of possible confusion that I
> personally regard as quite questionable. Previous discussion seemed to
> have accepted that contrib/cube was going to have to be renamed.
>
> Tom> I think that the cube extension is not going to be the only
> Tom> casualty if "cube" becomes a reserved word --- that seems like a
> Tom> name that could be in use in lots of applications. ("What do
> Tom> you mean, 9.5 breaks our database for tracking office space?")
> Tom> It would be worth quite a bit of effort to avoid that.
>
> It has been a reserved word in the spec since, what, 1999? and it is a
> reserved word in mssql, oracle, db2, etc.?
>
> It only needs to be a col_name_keyword, so it still works as a table
> or column name (as usual we are less strict than the spec in that
> respect). I'm looking into whether it can be made unreserved, but I
> have serious doubts about this being a good idea.
>

+1

contrib module should be renamed - more - current name is confusing against
usual functionality related to words CUBE and ROLLUP

Pavel

>
> --
> Andrew (irc:RhodiumToad)
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-08-21 16:18:46 Re: pg_dumpall reccomendation in release notes
Previous Message Andrew Gierth 2014-08-21 15:58:14 Re: WIP Patch for GROUPING SETS phase 1