X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 173289FB270 for ; Fri, 15 Sep 2006 06:15:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 41391-09 for ; Fri, 15 Sep 2006 06:15:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mta2.cl.cam.ac.uk (mta2.cl.cam.ac.uk [128.232.0.14]) by postgresql.org (Postfix) with ESMTP id 3ECAD9FB25E for ; Fri, 15 Sep 2006 06:15:11 -0300 (ADT) Received: from tern.cl.cam.ac.uk ([128.232.11.24]) by mta2.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id 1GO9mv-000561-00; Fri, 15 Sep 2006 10:15:09 +0100 Received: by tern.cl.cam.ac.uk (Postfix, from userid 1877) id BD267ED21; Fri, 15 Sep 2006 10:15:09 +0100 (BST) Date: Fri, 15 Sep 2006 10:15:09 +0100 From: Steven Murdoch To: pgsql-sql@postgresql.org Subject: Re: Sorting items in aggregate function (thanks) Message-ID: <20060915091509.GA32646@cl.cam.ac.uk> References: <20060912154628.GB4991@cl.cam.ac.uk> <20060912181759.GA66966@winnie.fuhr.org> <21365.1158093475@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: <21365.1158093475@sss.pgh.pa.us> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200609/106 X-Sequence-Number: 26317 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 12, 2006 at 04:37:55PM -0400, Tom Lane wrote: > Note that if you need to GROUP in the outer query, it's best to sort the > inner query's output first by the outer query's grouping: =2E.. Great - this works fine. Thanks also to the other people who replied. Steven. --=20 w: http://www.cl.cam.ac.uk/users/sjm217/ --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFFCm8dZJO2QFHioccRAq1SAJ9WoeKlRoR19aeisOkq5rmmIUx0yQCfdHOx v0x1/bfZa6OeXrR3d6RHniE= =M8f6 -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh--