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 634F130DDB4 for ; Tue, 10 Jun 2003 13:56:19 +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 95273-02 for ; Tue, 10 Jun 2003 10:56:09 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 8ACA830DD97 for ; Tue, 10 Jun 2003 10:56:07 -0300 (ADT) Received: (qmail 16465 invoked by uid 500); 10 Jun 2003 13:58:51 -0000 Date: Tue, 10 Jun 2003 08:58:51 -0500 From: Bruno Wolff III To: Eivind Kvedalen Cc: Tom Lane , pgsql-sql@postgresql.org Subject: Re: "Join" on delimeter aggregate query Message-ID: <20030610135851.GB16346@wolff.to> Mail-Followup-To: Eivind Kvedalen , Tom Lane , pgsql-sql@postgresql.org References: <200306061003.29430.mike@nachbaur.com> <3649.1055120755@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Archive-Number: 200306/82 X-Sequence-Number: 13840 On Mon, Jun 09, 2003 at 10:35:10 +0200, Eivind Kvedalen wrote: > > Ok. What I actually had in mind was whether the optimizer would remove the > ORDER BY clause completely or not, as it isn't used in the top-level > SELECT query, and SQL doesn't in general guarantee ordered rows back > unless there's an ORDER BY in the top-level SELECT (I haven't read the SQL > standard, so I might very well be wrong here). Allowing ordering in subselects is a feature (mostly for use with LIMIT) and won't be removed because it isn't a top level select.