Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C42542E44DC for ; Mon, 7 Jan 2008 12:33:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 65986-01-5 for ; Mon, 7 Jan 2008 12:33:16 -0400 (AST) Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id E65412E011E for ; Mon, 7 Jan 2008 12:22:50 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id m07GMpQ17669; Mon, 7 Jan 2008 11:22:51 -0500 (EST) From: Bruce Momjian Message-Id: <200801071622.m07GMpQ17669@momjian.us> Subject: Re: Cheers for DISTINCT ON In-Reply-To: To: Peter Kovacs Date: Mon, 7 Jan 2008 11:22:51 -0500 (EST) CC: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/27 X-Sequence-Number: 29881 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. > > On a slightly unrelated note, I had the opportunity to work with EQUEL > for a short period of time some 15 years ago before I started getting > famililar with SQL. I clearly remember the disappointment/surprise I > felt as I was struggling to translate some of the constructs I used > with EQUEL into SQL. At that time, I thought that (the by then > defunct) EQUEL was much more > expressive/intuitive/flexible/easier-to-use than SQL. I've been > wondering ever since why the worse so often gets the upper-hand over > the better. (I am obviously having a hard time "growing-up" :-) ) As a former EQUEL user myself I had the same reaction to SQL. I think EQUEL and SQL both have strengths, but I think SQL subqueries and the cleaner handling of group aggregates makes SQL more useful in a variety of ways. -- Bruce Momjian http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +