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 7FE2AD819F for ; Thu, 13 Oct 2005 15:43:09 -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 78426-07 for ; Thu, 13 Oct 2005 18:43:05 +0000 (GMT) Received: from smtp102.rog.mail.re2.yahoo.com (smtp102.rog.mail.re2.yahoo.com [206.190.36.80]) by svr1.postgresql.org (Postfix) with SMTP id 5CF34D868B for ; Thu, 13 Oct 2005 15:43:04 -0300 (ADT) Received: (qmail 7013 invoked from network); 13 Oct 2005 18:43:05 -0000 Received: from unknown (HELO phlogiston.dydns.org) (a.sullivan@rogers.com@209.222.54.227 with login) by smtp102.rog.mail.re2.yahoo.com with SMTP; 13 Oct 2005 18:43:05 -0000 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id D60CB412B; Thu, 13 Oct 2005 14:43:03 -0400 (EDT) Date: Thu, 13 Oct 2005 14:43:03 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: pg, mysql comparison with "group by" clause Message-ID: <20051013184303.GQ16317@phlogiston.dyndns.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878xwxi87h.fsf@stark.xeocode.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.033 required=5 tests=[AWL=-0.017, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/145 X-Sequence-Number: 22998 On Thu, Oct 13, 2005 at 02:26:58PM -0400, Greg Stark wrote: > Scott Marlowe writes: > > could run this query at the same time and get different data from the > > same set and the same point in time. > > I'm pretty unsympathetic to the "we should make a language less powerful and > more awkward because someone might use it wrong" argument. That's not what Scott's saying. Scott is saying that the syntax you're talking about is _formally wrong_. That's surely not "more powerful", except in the sense that stepping on a land mine is more powerful than many other ways you could shoot yourself in the foot. > path. In an ideal world the user should be guaranteed that > equivalent queries would always result in the same plan regardless > of how they're written. And again, I say it sounds like you're actually arguing for "the optimiser needs to get better". Special-purpose, formally wrong syntax is surely not better than making the optimiser get the right syntax right every time, is it? A -- Andrew Sullivan | ajs@crankycanuck.ca When my information changes, I alter my conclusions. What do you do sir? --attr. John Maynard Keynes