Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0656BB5DC16 for ; Fri, 15 Jul 2011 05:41:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 27613-05 for ; Fri, 15 Jul 2011 08:41:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mbx.knossos.net.nz (mbx.knossos.net.nz [202.160.48.10]) by mail.postgresql.org (Postfix) with ESMTP id F3CF1B5DC14 for ; Fri, 15 Jul 2011 05:41:33 -0300 (ADT) Received: from [10.1.1.3] (60-234-150-59.bitstream.orcon.net.nz [60.234.150.59]) (authenticated bits=0) by mbx.knossos.net.nz (8.14.4/8.14.4) with ESMTP id p6F8fVLw015013 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 15 Jul 2011 20:41:32 +1200 Message-ID: <4E1FFD3B.5090708@archidevsys.co.nz> Date: Fri, 15 Jul 2011 20:41:31 +1200 From: Gavin Flower Organization: ArchiDevSys User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.11 MIME-Version: 1.0 To: pgsql-docs@postgresql.org Subject: pg 9.1beta3 typo in 7.2.3 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201107/13 X-Sequence-Number: 6880 I think that there is a typo in the paragraph: 'x' used instead of 'y' in 'GROUP BY'. postgres-9.1beta3/share/doc/html/queries-table-expressions.html 7.2.3. The GROUP BY and HAVING Clauses [...] => SELECT x FROM test1 GROUP BY x; x --- a b c (3 rows) In the second query, we could not have written SELECT * FROM test1 GROUP BY x, because there is no single value for the column y that could be associated with each group. The grouped-by columns can be referenced in the select list since they have a single value in each group. [...] The paragraph should read "...SELECT * FROM test1 GROUP BY y..." Cheers, Gavin