Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id F39282E400C for ; Mon, 7 Jan 2008 12:24:48 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 99141-02-7 for ; Mon, 7 Jan 2008 12:24:43 -0400 (AST) Received: from main1.mycybernet.net (main1.mycybernet.net [209.222.63.135]) by postgresql.org (Postfix) with ESMTP id 47BED2E4391 for ; Mon, 7 Jan 2008 12:18:37 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=crankycanuck.ca) by main1.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1JBug4-0000v5-O9 for pgsql-sql@postgresql.org; Mon, 07 Jan 2008 11:18:16 -0500 Received: by crankycanuck.ca (Postfix, from userid 1000) id 260A84FFE1; Mon, 7 Jan 2008 11:18:12 -0500 (EST) Date: Mon, 7 Jan 2008 11:18:12 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Cheers for DISTINCT ON Message-ID: <20080107161812.GS18581@crankycanuck.ca> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/26 X-Sequence-Number: 29880 On Mon, Jan 07, 2008 at 05:02:27PM +0100, Peter Kovacs wrote: > I just wanted to give my cheers for DISTINCT ON. It is a great > feature, I've just found a really good use for it. I am just wondering > why it didn't make it into the standards. Likely because neither Oracle Corp nor IBM nor (at the time, I guess) Sybase had an implementation they were willing to spend enough time promoting. > wondering ever since why the worse so often gets the upper-hand over > the better. (I am obviously having a hard time "growing-up" :-) ) There is a long history in the computing literature on this, but the best explanation is probably still Richard Gabriel's 'The Rise of "Worse is Better"': . Note that Gabriel himself is of two minds about that paper: . I still think it's worth reading. Just about everything I've ever written or said turned out to be wrong in some sense, but it was still usually the result of the best argument I could make at the time. A