X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id E765A9FB69B for ; Fri, 1 Sep 2006 18:43:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 02444-05-6 for ; Fri, 1 Sep 2006 21:42:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 4EE329FB74C for ; Fri, 1 Sep 2006 16:58:59 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Fri, 1 Sep 2006 19:58:58 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 01 Sep 2006 14:58:58 -0500 Subject: Re: help with pagila From: Scott Marlowe To: Walter Cruz Cc: Andrew Sullivan , pgsql-sql@postgresql.org In-Reply-To: <32cabba0609011026r6616a73bhe80b336f18aa84ac@mail.gmail.com> References: <32cabba0609010631t233d13f9o38edba0483a2446c@mail.gmail.com> <20060901152116.GE17178@phlogiston.dyndns.org> <32cabba0609011026r6616a73bhe80b336f18aa84ac@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1157140737.4786.31.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 01 Sep 2006 14:58:58 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200609/6 X-Sequence-Number: 26217 On Fri, 2006-09-01 at 12:26, Walter Cruz wrote: > So I can assume that the MySQL implementation is strange? (It accepts > that kind of query) Yes, according to the SQL spec, you should generally get an error when you run a query like this: select field1, field2 from table group by field1 since you could theoretically get a different value for field2 each time you run the query. If the data looked like this: field1 | field2 -------+-------- 1 | 1 1 | 3 2 | 5 2 | 3 The possible answers to that query would be (1,1)(2,5), (1,1)(2,3), (1,3)(2,5), (1,3)(2,3)