Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA35350; Wed, 26 Jan 2000 18:33:10 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id SAA29624; Wed, 26 Jan 2000 18:16:32 -0500 (EST) From: Bruce Momjian Message-Id: <200001262316.SAA29624@candle.pha.pa.us> Subject: Re: [HACKERS] Re: [SQL] DISTINCT ON: speak now or forever hold your peace In-Reply-To: <19434.948927908@sss.pgh.pa.us> from Tom Lane at "Jan 26, 2000 06:05:08 pm" To: Tom Lane Date: Wed, 26 Jan 2000 18:16:32 -0500 (EST) CC: Chris Bitmead , pgsql-hackers@postgreSQL.org, pgsql-sql X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Chris Bitmead writes: > > As long as we're fixing the syntax, I'm wondering if it wouldn't be more > > logical to have DISTINCT ON somewhere later in the syntax. > > Well, SELECT DISTINCT is that way because SQL92 says so. Putting the > DISTINCT ON variant somewhere else might be logically purer, but I think > it'd be confusing. > > Also, isn't the reason we have DISTINCT ON at all that it's there to > be compatible with MySQL or someone? I figured adding parens would be > about the least-surprising variant syntax for a person used to those > other products. > Makes sense to me. -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026