X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1A956D8185 for ; Thu, 13 Oct 2005 15:49:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79269-10 for ; Thu, 13 Oct 2005 18:49:39 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 49061D80CC for ; Thu, 13 Oct 2005 15:49:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9DInb11024790; Thu, 13 Oct 2005 14:49:37 -0400 (EDT) To: Scott Marlowe Cc: Greg Stark , Stephan Szabo , Rick Schumeyer , pgsql-sql@postgresql.org Subject: Re: pg, mysql comparison with "group by" clause In-reply-to: <1129228672.29961.214.camel@state.g2switchworks.com> References: <001001c5cea8$77cabc90$0300a8c0@dell8200> <20051011142658.C54076@megazone.bigpanda.com> <87br1u1jvq.fsf@stark.xeocode.com> <1129155875.29961.168.camel@state.g2switchworks.com> <87zmpez0au.fsf@stark.xeocode.com> <1129219046.29961.184.camel@state.g2switchworks.com> <878xwxi87h.fsf@stark.xeocode.com> <1129228672.29961.214.camel@state.g2switchworks.com> Comments: In-reply-to Scott Marlowe message dated "Thu, 13 Oct 2005 13:37:52 -0500" Date: Thu, 13 Oct 2005 14:49:37 -0400 Message-ID: <24789.1129229377@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/147 X-Sequence-Number: 23000 >>>> 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