Re: pg, mysql comparison with "group by" clause

From: "Anthony Molinaro" <amolinaro(at)wgen(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Scott Marlowe" <smarlowe(at)g2switchworks(dot)com>
Cc: "Greg Stark" <gsstark(at)mit(dot)edu>, "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com>, "Rick Schumeyer" <rschumeyer(at)ieee(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: pg, mysql comparison with "group by" clause
Date: 2005-10-13 19:06:36
Message-ID: 3C6C2B281FD3E74C9F7C9D5B1EDA4582182621@wgexch01.wgenhq.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Well...

An additional gripe is that this isn't a good feature (standard or not).
Oracle doesn't do it. Db2 doesn't do it. I strongly suggest you guys
don't
do it.

If you wanna do the optimizations under the covers, cool, but I can't
imagine how this would be useful other than for saving some typing...

Seems more trouble than it's worth and changes a concept that's tried
and true for many years.

Regards,
Anthony

-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Thursday, October 13, 2005 2:50 PM
To: Scott Marlowe
Cc: Greg Stark; Stephan Szabo; Rick Schumeyer; pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] pg, mysql comparison with "group by" clause

>>>> In standard SQL you have to
>>>> write GROUP BY ... and list every single column you need from the
master
>>>> table.

This thread seems to have gone off on a tangent that depends on the
assumption that the above is a correct statement. It's not. It *was*
true, in SQL92, but SQL99 lets you omit unnecessary GROUP BY columns.

The gripe against mysql, I think, is that they don't enforce the
conditions that guarantee the query will give a unique result.

The gripe against postgres is that we haven't implemented the SQL99
semantics yet.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-10-13 19:16:40 Re: pg, mysql comparison with "group by" clause
Previous Message Tom Lane 2005-10-13 18:49:37 Re: pg, mysql comparison with "group by" clause