Re: Patch for adding DATACUBE operator

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: sumit <sumit(at)gdit(dot)iiit(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch for adding DATACUBE operator
Date: 2003-06-30 16:48:40
Message-ID: 1056991718.28657.82.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Moving to pgsql-hackers@

On Mon, 2003-06-30 at 12:03, sumit wrote:
> Thanks for letting know. Could you also let me know the exact
> syntax, I mean, we are not sure whether GROUP BY CUBE(...) is followed by
> a HAVING clause. Kindly inform us soon so that we can make the changes and
> send you the updated patch and files.

Sources of the SQL Spec
http://developer.postgresql.org/readtext.php?src/FAQ/FAQ_DEV.html+Developers-FAQ#1.12

The relevent syntax appears to be in section 7.9, and is a part of the
GROUP BY clause, so is potentially followed by a HAVING clause.

7.9 <group by clause>

Function

Specify a grouped table derived by the application of the
<group by
clause> to the result of the previously specified clause.

Format

<group by clause> ::=
GROUP BY <grouping specification>

<grouping specification> ::=
<grouping column reference>
| <rollup list>
| <cube list>
| <grouping sets list>
| <grand total>
| <concatenated grouping>

<rollup list> ::=
ROLLUP <left paren> <grouping column reference list>
<right paren>

<cube list> ::=
CUBE <left paren> <grouping column reference list> <right
paren>

<grouping sets list> ::=
GROUPING SETS <left paren> <grouping set list> <right
paren>

<grouping set list> ::=
<grouping set> [ { <comma> <grouping set> }... ]

<concatenated grouping> ::=
<grouping set> <comma> <grouping set list>

<grouping set> ::=
<ordinary grouping set>
| <rollup list>
| <cube list>
| <grand total>

<ordinary grouping set> ::=
<grouping column reference>
| <left paren> <grouping column reference list> <right
paren>

<grand total> ::= <left paren> <right paren>

<grouping column reference list> ::=
<grouping column reference>
[ { <comma> <grouping column reference> }... ]

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-06-30 16:58:58 Re: Patch for adding DATACUBE operator
Previous Message sumit 2003-06-30 16:03:49 Re: Patch for adding DATACUBE operator

Browse pgsql-patches by date

  From Date Subject
Next Message Kim Ho 2003-06-30 16:56:56 Re: Allow setObject(x,y,Types.BIT) if y is a Number &
Previous Message Barry Lind 2003-06-30 16:44:16 Re: Allow setObject(x,y,Types.BIT) if y is a Number &