X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 67FE930EEC6 for ; Mon, 16 Jun 2003 17:28:54 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 14433-09 for ; Mon, 16 Jun 2003 14:28:43 -0300 (ADT) Received: from mwinf0102.wanadoo.fr (smtp8.wanadoo.fr [193.252.22.30]) by svr1.postgresql.org (Postfix) with ESMTP id 63D6F30EEBF for ; Mon, 16 Jun 2003 14:28:42 -0300 (ADT) Received: from gina (unknown [80.11.203.116]) by mwinf0102.wanadoo.fr (SMTP Server) with ESMTP id D47B71BFD3E6; Mon, 16 Jun 2003 19:28:40 +0200 (CEST) From: Guillaume LELARGE Organization: traduc.org To: emmanuel@engelhart.org Subject: Re: UNION & LIMIT & ORDER BY Date: Mon, 16 Jun 2003 19:37:36 +0000 User-Agent: KMail/1.5 References: <20030614190127.51910c98.emmanuel@engelhart.org> In-Reply-To: <20030614190127.51910c98.emmanuel@engelhart.org> Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200306161937.36395.gleu@wanadoo.fr> X-Archive-Number: 200306/158 X-Sequence-Number: 13916 Hi, Le Samedi 14 Juin 2003 17:01, Emmanuel Engelhart a =E9crit : > [...] Taken from the postgresql manual=20 (http://www.postgresql.org/docs/view.php?version=3D7.3&idoc=3D0&file=3Dsql-= select.html#SQL-UNION): ORDER BY and LIMIT can be attached to a sub-expression if it is enclosed in= =20 parentheses. Without parentheses, these clauses will be taken to apply to t= he=20 result of the UNION, not to its right-hand input expression. Regards. --=20 Guillaume .